android - Using Gradle Spoon Plugin to launch tests in specific location -
i having problem find documentation how solve case.
i capable of launching small/medium/large tests with:
./gradlew spoonsmall ./gradlew spoonmedium ./gradlew spoonlarge
or launching specific tests usage of setup:
spoon { (...) if (project.hasproperty('spoonclassname')) { classname = project.spoonclassname if (project.hasproperty('spoonmethodname')) { methodname = project.spoonmethodname } } }
i can launch specific file:
./gradlew spoon -pspoonclassname=com.package.tests.mytest;
what interested in possibility launch tests located in:
./gradlew spoon -pspoonclassname=com.package.tests
package. either method fine. parameter bash console or maybe way create own annotation , launch ./gradlew spoonmytests.
i grateful suggestions/help.
from official docs:
there numerous ways run specific test, or set of tests. can use spoon --size, --class-name or --method-name options, or can use --e option pass arguments instrumentation runner, e.g.
--e package=com.mypackage.unit_tests
the following command should work when executing spoon directly command line (not gradle task)
java -jar spoon-runner-1.1.9-jar-with-dependencies.jar \ --apk exampleapp-debug.apk \ --test-apk exampleapp-debug-androidtest-unaligned.apk \ --e package=com.package.tests
you need find way pass param spoon gradle plugin.
update
from official doc of spoon gradle plugin:
custom instrumentation arguments
use instrumentationargs property on spoon extension pass custom parameters tests:
spoon { instrumentationargs = ["foo=bar", "name=value"] }
in case, should following:
spoon { instrumentationargs = ["package=com.package.tests"] }
Comments
Post a Comment