Skip to content

Commit

Permalink
unit test IDE execution improvements (#463)
Browse files Browse the repository at this point in the history
* update README about Run Configuration setting
* update task that needs to depend on assembleFullDebug
** this was needed to run individual local tests
  • Loading branch information
calebzor authored and SyncedSynapse committed Oct 1, 2017
1 parent d447789 commit 8fb24ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ afterEvaluate {
* so this dependency fixes the issue.
*/
tasks.whenTaskAdded { task ->
if (task.name.contains("testFullDebugUnitTest")) {
if (task.name.contains("compileFullDebugUnitTestSources")) {
task.dependsOn assembleFullDebug
}
}
7 changes: 4 additions & 3 deletions app/src/test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ You can run the tests as follows:

### Android Studio

1. Select build variant "fullDebug"
2. Set the [Project view](https://developer.android.com/studio/projects/index.html) to Android
3. Right-click on the directory "test" and select "Run tests"
1. Make sure in the Run/Debug Configurations - Android JUnit - Defaults for Working directory: `$MODULE_DIR$` is set.
2. Select build variant "fullDebug"
3. Set the [Project view](https://developer.android.com/studio/projects/index.html) to Android
4. Right-click on the directory "test" and select "Run tests"

### Commandline

Expand Down

0 comments on commit 8fb24ee

Please sign in to comment.