Skip to content

Instantly share code, notes, and snippets.

@Aracem
Last active January 31, 2020 12:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aracem/2a36251f1b3db6880a57ed3df4d685ee to your computer and use it in GitHub Desktop.
Save Aracem/2a36251f1b3db6880a57ed3df4d685ee to your computer and use it in GitHub Desktop.
Launch an unit test using a terminal
// Launch a test from a terminal
./gradlew :module:testFlavourBuildType --tests "*ClassNameTest"
./gradlew :module:testFlavourBuildType --tests "com.aracem.android.ClasNameTest"
// To attach Android Studio debugger
./gradlew :module:testFlavourBuildType --tests "*ClassNameTest" --debug-jvm
// Then wait until the compilation finished and attach a debuger. In Android studio use CTRL + SHIFT + A,
// search for "Debugger" and select attach to local source
// Launch UI test sample
./gradlew :presentation:connectedStagingDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.jobandtalent.android.candidates.opportunities.browse.questions.KillerQuestionsActivityTest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment