oppia-android
oppia-android copied to clipboard
Add thorough tests for the question player
Similar to #388 we need thorough tests for the question player once these can be written in a reliable way for both Espresso & Robolectric.
Test reference: https://github.com/oppia/oppia-android/blob/develop/app/src/sharedTest/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerActivityTest.kt
Enough of #89 is now complete that this is no longer blocked.
@anandwana001 I would like to work on this
@chrk2205 assigned to you. Few points to get start:
- Write down all the edges case which needs to get tested.
- Don't include end to end test, example like opening and activity and the checking any view. Robolectric doesn't support end to end test.
- All the test should pass on both espresso and robolectric
How you can send a pr for this:
- After writing all the points what we need to test, create a comment block in the test file and write the test names and send for review
- Once above reviewed, you can write test cases.
Let me know if you need any help in this.
there are some test cases already present in the QuestionPlayerActivityTest.kt
Do I need to write test cases apart from them ??
@anandwana001
thanks
@anandwana001 for test cases should I include this??
- OnBackPressed and its respective cases
- toolbar title display
thanks
Yes, for both comments above
@anandwana001 Is this issue still needed to be fixed?
@ayush0402 yes. There's no dedicated test suite for questions currently. We have a few tests in QuestionPlayerActivityTest, but what we really need are QuestionPlayerFragmentLocalTest and QuestionPlayerFragmentTest akin to StateFragmentLocalTest and StateFragmentTest, respectively, that test various interaction & hint scenarios for questions.