Skip to content
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

Added SignUp Button Unit Test #2687

Merged
merged 1 commit into from Mar 20, 2019

Conversation

madhurgupta10
Copy link
Collaborator

Description
Added SignUp Button Unit Test.

Fixes #2686 Write Unit Test for Login Activity

Tests performed
Tested betaDebug on Xiaomi Mi A1 with API level 28 stock android.

Test Result

Testing started at 03:20 AM ...
03/21 03:20:42: Launching isSignUpButtonWorks()
$ adb push C:\Users\madhu\Desktop\apps-android-commons\app\build\outputs\apk\beta\debug\app-commons-v2.10.1-unit-test-login-beta-debug.apk /data/local/tmp/fr.free.nrw.commons.beta
$ adb shell pm install -t -r "/data/local/tmp/fr.free.nrw.commons.beta"
Success
APK installed in 2 s 252 ms
$ adb push C:\Users\madhu\Desktop\apps-android-commons\app\build\outputs\apk\androidTest\beta\debug\app-commons-v2.10.1-unit-test-login-beta-debug-androidTest.apk /data/local/tmp/fr.free.nrw.commons.beta.test
$ adb shell pm install -t -r "/data/local/tmp/fr.free.nrw.commons.beta.test"
Success
APK installed in 1 s 801 ms
Running tests
$ adb shell am instrument -w -r -e debug false -e class 'fr.free.nrw.commons.LoginActivityTest#isSignUpButtonWorks' fr.free.nrw.commons.beta.test/androidx.test.runner.AndroidJUnitRunner
Connected to process 29063 on device xiaomi-mi_a1-7af99b9c0404
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/rw.commons.bet: The ClassLoaderContext is a special shared library.
Started running tests
Tests ran to completion.

Test Passed

@codecov-io
Copy link

Codecov Report

Merging #2687 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #2687   +/-   ##
======================================
  Coverage    2.81%   2.81%           
======================================
  Files         258     258           
  Lines       12376   12376           
  Branches     1111    1111           
======================================
  Hits          349     349           
  Misses      12001   12001           
  Partials       26      26

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fc7399c...2cecc32. Read the comment docs.

Copy link
Member

@domdomegg domdomegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Ideally (can be fixed in another PR) more would be tested and it would check that the user was logged out before running these tests as currently they fail if the user is logged in (as the app redirects to MainActivity)

@domdomegg domdomegg merged commit 0612519 into commons-app:master Mar 20, 2019
@madhurgupta10
Copy link
Collaborator Author

@domdomegg Sure, I will add more tests soon :)

@madhurgupta10 madhurgupta10 deleted the unit-test-login branch March 20, 2019 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants