Reputation: 2747
I am executing unit testing of my Android App with Maven on a Jenkins server.
Everything works as expected, but when I want to specify multiple packages for testing the unit tests are not executed anymore. Maybe it's just my misunderstanding of the syntax in the pom.xml? I thought that you could add multiple packages for unit testing.
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<test>
<createReport>true</createReport>
<packages>
<!-- just one package works without problem -->
<package>a.b.c</package>
<package>a.b.d</package>
</packages>
</test>
</configuration>
<extensions>true</extensions>
</plugin>
</plugins>
Upvotes: 0
Views: 157
Reputation: 38168
The adb documentation for executing packages is here : http://developer.android.com/tools/testing/testing_otheride.html#RunTestsCommand
To run a single test package the syntax is :
adb shell am instrument -w <test_package_name>/<runner_class>
I don't think there is any way to run multiple test package in a single command line. So, as the maven plugin ought to be a wrapper for adb, I guess it's not possible to achieve what you want.
You may use profiles to run different test packages.
Upvotes: 2