Maven Android instrumentation test output -
as experiment, trying use maven build google android market licensing library, sample, , test projects. here pom.xml test project:
<?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelversion>4.0.0</modelversion> <groupid>etherwalker.example</groupid> <artifactid>license_test</artifactid> <version>0.0.1-snapshot</version> <packaging>apk</packaging> <name>license - instrumentation tests</name> <parent> <groupid>etherwalker.example</groupid> <artifactid>license_parent</artifactid> <version>0.0.1-snapshot</version> </parent> <dependencies> <dependency> <groupid>com.google.android</groupid> <artifactid>android</artifactid> <scope>provided</scope> </dependency> <dependency> <groupid>com.google.android</groupid> <artifactid>android-test</artifactid> <scope>provided</scope> </dependency> <dependency> <groupid>junit</groupid> <artifactid>junit</artifactid> <scope>test</scope> </dependency> <dependency> <groupid>etherwalker.example</groupid> <artifactid>license_sample</artifactid> <version>0.0.1-snapshot</version> <type>apk</type> <scope>provided</scope> </dependency> <dependency> <groupid>etherwalker.example</groupid> <artifactid>license_sample</artifactid> <version>0.0.1-snapshot</version> <type>jar</type> <scope>provided</scope> </dependency> </dependencies> <build> <sourcedirectory>src</sourcedirectory> <plugins> <plugin> <groupid>com.jayway.maven.plugins.android.generation2</groupid> <artifactid>maven-android-plugin</artifactid> <extensions>true</extensions> </plugin> </plugins> </build> </project>
when run mvn install
in project, following error when android instrumentation unit tests run:
[info] c:\usr\android-sdk-windows/platform-tools/adb.exe [shell, am, instrument, -w, com.example.android.market.licensing.test/android.test.instrumentationtestrunner] com.android.vending.licensing.aesobfuscatortest:....... com.android.vending.licensing.obfuscatedpreferencestest:instrumentation_result: shortmsg=java.security.spec.invalidkeyspecexception instrumentation_result: longmsg=java.security.spec.invalidkeyspecexception: java.io.eofexception: eof encountered in middle of object instrumentation_code: 0
what want know is, can find junit results, , stack trace exception?
this error appears when nothing test (your main project not build).
the structure of maven project must be:
your_project-parent
|--your_project
|--your_project-it
when
your_project - main project
your_project-parent - parent project
your_project-it - instrumental testing project
you must run mvn install on your_project-perent project.
then first builds main project test project.
Comments
Post a Comment