...
By default, test sources are excluded from analysis. To analyze test code, disable the
excludeTestSources
option; see Jtest Goals Reference for Gradle.
Running Static Analysis for Android Projects
Jtest allows running static analysis configurations for Android projects using dedicated Gradle tasks. The static analysis can be executed for a particular application variant (build type and product flavor). Only one application variant is supported per run. To perform static analysis for more than one application variant, you must run it separately for each variant.
To perform static analysis, the following task must be executed:
jtest[APPLICATION VARIANT NAME]
- where APPLICATION VARIANT NAME
is the name of the application variant for which the test configuration will be run.
To list available tasks for all application variants for an Android Gradle build, use the command:
Code Block |
---|
gradlew tasks –I [JTEST_HOME/integration/gradle/init.gradle] |
Example:
This example shows a command line that executes the "Android Guidelines" test configuration for a “Debug” build type and a flavor named “Demo” (the application variant name is "DemoDebug").
Code Block |
---|
gradlew installDemoDebug jtestDemoDebug –Djtest.config=”builtin://Android Guidelines” |
Anchor | ||||
---|---|---|---|---|
|
...