Mentorship-android: Fix failing SignUpActivity Test

Created on 7 Sep 2020  路  12Comments  路  Source: anitab-org/mentorship-android

Fix the failing tests for SignUpActivity. Currently the tests for the SignUpActivity.kt fail due to:

  1. The wrong string being checked for EMPTY_USERNAME_ERROR
  2. Additionally, tests pass when run individually (individual test functions) but fail when the entire Espresso test is run. Some research suggested that this could be caused due to the backend network calls. This could potentially be solved by using Idling Resources or Mock backends. More discussion is needed for this.

Describe the solution you'd like
Fix the failing Espresso tests in SignUpActivityTest.kt

Acceptance criteria:

  • [ ] Fix all the tests individually. Verify that each test passes when run individually (Can be done by clicking on the play button next to the test name)
    image
  • [ ] Connect Android device or open the emulator
  • [ ] On terminal type ./gradlew clean build connectedAndroidTest --stacktrace
  • [ ] Wait for your test to complete
  • [ ] See the complete report ../me
  • [ ] Check if the all tests for SignUpActivity run successfully.
Testing

All 12 comments

@iofall why is this and next 2 PRs on hold?

Thanks for the tag @vj-codes , I am modifying this issue, we were going to split the failing tests across multiple issues but getting inconsistent results. I will modify this ASAP

@iofall Can I work on this issue ?

@justdvnsh assigned you to the LoginActivity issue. Let me know when done and I will assign you to this. Thanks!

@iofall Created a PR for #918 . Can I now be assigned this issue ?

@iofall One thing before I start working on this, is I would be creating similar file changes for Signup Activity Test also as i did in #918 . Like the tests would be different but the rest of the files would be the same, like the IdlingResourceObject and the gradle changes . So, should I proceed or there is some way around this ?

@justdvnsh I think it would be okay to have the same changes here as well. I would suggest making multiple commits - 1. For the IdlingResourceObject and the gradle changes 2. For the actual fix of the issue.

@iofall cool. Thanks !

@iofall Created a PR !

@justdvnsh @iofall I think this has been solved should this be closed?

@epicadk i guess so

Closing this issue because it is fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

annabauza picture annabauza  路  6Comments

isabelcosta picture isabelcosta  路  6Comments

Priyansh-Kedia picture Priyansh-Kedia  路  6Comments

iofall picture iofall  路  3Comments

devanshi7799 picture devanshi7799  路  8Comments