-
Notifications
You must be signed in to change notification settings - Fork 554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix app module tests for Roboelectric #973
Comments
@rt4914 please assign me one of these tasks. |
@rt4914 Can you assign me some of this task. Also, this task means that we would be running the previously written tests in Roboelectric, or writing new tests based on previous tests? |
You can just run the previously written test cases in Roboelectic and which every test fails, fix them and make sure that it passes on Espresso as well as Roboelectric |
@rt4914 So I followed the steps given in the link above and all the tests in |
@rt4914 Assign me any one of these tasks. Thanks. |
@rt4914 |
@rt4914 In |
@rt4914 for the tests concerning dialog-box opening or navigation-bar opening, it would not work with roboelectric in the same way as it works in espresso, thus for these we may need to write separate tests, I have been able to successfully write tests for dialogBoxes in roboelectric but those don't work in espresso, thus we may need to write separately for these tests |
@abhinavraj23 Its write to add new test cases as per requirement but each and every test case should pass on both espresso and roboelectric. So you can just create a PR and we can figure out from that. |
@virajpatel2411 It can happen that tests pass on espresso and fails on roboelectic and that's why we have this issue to track everything. Have you tried searching for solutions for those errors on internet? |
Yes, but I didn't find anything helpful. Imk, there resides some issue with |
@virajpatel2411 You can either prepare a document of what all things you have tried and the errors you have faced so that we can have a look. But the main point is that you will need to give information in detail so that we can have a look at the problem. |
Okay...Will share the details once I have prepared it. Thanks. |
@rt4914 https://docs.google.com/document/d/12vTSL8eW9LMtPmxSGFnWvmQfJumJ4BOdBduqeUm8vmw/edit?usp=sharing. |
@rt4914 Any updates for further work? |
@veena14cs PTAL at this issue. |
@veena14cs This is the link to document. |
@rt4914 @veena14cs Any updates? |
@virajpatel2411 I checked the document will figure this out, till then you can pick out some new issue and start working on it. Once we figure out, I will update you on this. |
@veena14cs Okay. |
@virajpatel2411 I tried added Documentation of Robolectric Looper |
@anandwana001 Okay. So, now is there anything to do from my side or the issue now is resolved? |
…eActivityTest (#1842) * fix AddProfileActivityTest for robolectric * added todo
…rdActivityTest (#1854) * fix PinPasswordActivityTest for robolectric * added todo
…asswordActivityTest (oppia#1854) * fix PinPasswordActivityTest for robolectric * added todo
…onActivityTest (#1850) * fix ExplorationActivityTest for robolectric * max line fix * nit changes * aaded todo 1855
…picListActivityTest (#1863) * fix OngoingTopicListActivityTest test for robolectric * removed unnecessary functions
I am taking up |
@rt4914 Since we are going to take this issue under SLoP, can we freeze its contributions for now ? It might lead to confusion otherwise. |
Sounds good |
@BenHenning should we include |
@Sarthak2601 StateFragmentTest is fixed & running (as of #1630). Thanks for checking. That being said, #388 & https://github.com/oppia/oppia-android/blob/develop/app/src/sharedTest/java/org/oppia/app/player/state/StateFragmentTest.kt#L206 might be a great set of tests that could be split into starter issues for SLoP. Ditto for question player (#503). #1273 also needs to be done (hints & solutions tests for questions). @rt4914 we talked about not adding missing test cases, but much of the above is already figured out & immediately high impact since it covers the core learner experiences. It seems worth finishing that work. Another unrelated area of work that I thought of: creating common test dependencies for matchers, shared modules, and shared utility functions (especially the ones used between state & question players). |
…rofileActivityTest (oppia#1842) * fix AddProfileActivityTest for robolectric * added todo
…asswordActivityTest (oppia#1854) * fix PinPasswordActivityTest for robolectric * added todo
…orationActivityTest (oppia#1850) * fix ExplorationActivityTest for robolectric * max line fix * nit changes * aaded todo 1855
…ingTopicListActivityTest (oppia#1863) * fix OngoingTopicListActivityTest test for robolectric * removed unnecessary functions
Currently, the
app
module test cases are passing onEspresso
but they should also pass onRobolectric
. Fix these below mentioned files to make sure that the tests pass onRobolectric
.You can run robolectric tests by following these steps: https://github.com/oppia/oppia-android/wiki/Oppia-Android-Testing#running-roboelectric-tests
Also, make sure that you assign yourself one task only at a time, which you can mention in the comments below.
Fixing test cases will need to introduce
TextApplicationComponent
. This can be seen here.AppVersionActivityTest
(Assigned to @anandwana001 )CompletedStoryListActivityTest
(Assigned to @anandwana001 )FAQListFragmentTest
(Assigned to @Sarthak2601 )FAQSingleActivityTest
(Assigned to @SayantanBanerjee16 )HelpFragmentTest
(Assigned to @SayantanBanerjee16 )MyDownloadsFragmentTest
(Assigned to @anandwana001 )HtmlParserTest
(Assigned to @anandwana001 )StateFragmentTest
(Fixed in Fix part of #973: Stabilize state fragment tests #1630)AddProfileActivityTest
(Assigned to @anandwana001 )AdminAuthActivityTest
(Assigned to @anandwana001 )AdminPinActivityTest
(Assigned to @anandwana001 )ProfilePictureActivityTest
(Assigned to @anandwana001 )ProfileProgressFragmentTest
(Assigned to @veena14cs )BindableAdapterTest
(Assigned to @anandwana001 )SplashActivityTest
(Fixed in Fix #1298: Introduce app auto expiration #1397)StoryActivityTest
(Assigned to @anandwana001 )StoryFragmentTest
(Assigned to @anandwana001 )QuestionPlayerActivityTest
(Assigned to @anandwana001)TopicTestActivityForStoryTest
(Assigned to @anandwana001 )RevisionCardFragmentTest
(Assigned to @anandwana001 )WalkthroughWelcomeFragmentTest
(Assigned to @veena14cs )WalkthroughTopicListFragmentTest
(Assigned to @anandwana001 )WalkthroughFinalFragmentTest
(Assigned to @anandwana001 )WalkthroughActivityTest
(Assigned to @anandwana001 )The text was updated successfully, but these errors were encountered: