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 instrumentation test infrastructure. #151

Merged
merged 1 commit into from
Jun 10, 2015
Merged

Conversation

JakeWharton
Copy link
Owner

A custom test runner subclass flips a boolean on a debug module before the graph is created. When the graph does get created, we use that boolean to force mock mode and skip wrapping the debug controls (both because it would never be used but also to ensure view-based matchers of Espresso work). We also kill the keyguard and hold a wake lock so that the screen is on and visible.

Closes #149. Closes #152.

@JakeWharton
Copy link
Owner Author

Note: this does not actually run the tests on CI. I'll do that in a follow-up along with maybe some actual tests...

@JakeWharton
Copy link
Owner Author

Damn. Of course Travis is set up to run connectedCheck. Whevs. I'll just add it now...

@JakeWharton
Copy link
Owner Author

Test is failing but passes locally (though I'm on 5.1 emu). Thanks for the HTML report on the CI server, Gradle. Useless. Too late to look tonight, maybe tomorrow.

A custom test runner subclass flips a boolean on a debug module before the graph is created. When the graph does get created, we use that boolean to force mock mode and skip wrapping the debug controls (both because it would never be used but also to ensure view-based matchers of Espresso work). We also kill the keyguard and hold a wake lock so that the screen is on and visible.
mattprecious added a commit that referenced this pull request Jun 10, 2015
Add instrumentation test infrastructure.
@mattprecious mattprecious merged commit c1ad57b into master Jun 10, 2015
@mattprecious mattprecious deleted the jw/test-infra branch June 10, 2015 15:42
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.

Run instrumentation tests on CI Add instrumentation test infrastructure
2 participants