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

Add UI Testing #9

Open
sauloaguiar opened this issue Jan 12, 2017 · 4 comments
Open

Add UI Testing #9

sauloaguiar opened this issue Jan 12, 2017 · 4 comments

Comments

@sauloaguiar
Copy link
Owner

Follow these suggestions
http://blog.greenhouseci.com/greenhouse/update/android-testing-with-kotlin/
https://github.com/pot8os/Kotlin-Espresso-sample/blob/master/app/src/androidTest/kotlin/net/pot8os/kotlintestsample/ApplicationTest.kt

To test the following paths in the application:
1.
Given that the app is open
Click on the about menu
Open the dialog and check the displayed information

Given that the app is open
Click on a project
Check the project name is displayed on the action bar

Given an open project
Select a developer under the list
Check that the browser opens with the correct url

@sauloaguiar
Copy link
Owner Author

sauloaguiar commented Jan 14, 2017

To open the menu - as described in one of the test cases - it was necessary to check for the string instead of the id of the menu.
Espresso NoMatchingViewException when using withId matcher

Check if a dialog is displayed with Espresso

@sauloaguiar
Copy link
Owner Author

sauloaguiar commented Jan 27, 2017

Need to check on Espresso Idling Resources.
Test cases are failing sometimes because we have an async call on our main screen that is being tested

@sauloaguiar
Copy link
Owner Author

Also check this essay on how to properly test apps - hint using dependency injection.

@sauloaguiar
Copy link
Owner Author

Some more progress on the task, but a lot of new challenges are coming up. I started by trying to solve the idling resource issue mentioned previously. This blog entry served as guide pointing me to use Jake Wharton's OkHttp Idling Resource lib as the solution. After struggling a bit trying to solve the proposed approach - two issues took me some time along the way:

Now, the issue is still open because I'm unable to get a reference to my Application class - so I can have a reference to OkHttp member - from my espresso test class.

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

No branches or pull requests

1 participant