Akquinet (Android with a test archetype) - unit tests fail

I created an Android project using the akquinet archetype:

mvn archetype:generate \ -DarchetypeArtifactId=android-with-test \ -DarchetypeGroupId=de.akquinet.android.archetypes \ -DarchetypeVersion=1.0.11 \ -DgroupId=com.foo.bar \ -DartifactId=my-android-project \ -Dpackage=com.foo.bar.android 

This archetype creates

  • parent project
  • myproject project with a real android application and
  • myproject-it with integration tests.

When I add the following test class to the myproject-it project and run mvn install , I do not get a test error message.

 import org.junit.Assert; import org.junit.Test; public class SimCardReaderTest { @Test public void testGetAvailableSimCards() { Assert.fail("Not implemented"); } } 

Therefore, unit test fails.

What can I do to run unit tests (tests that are not dependent on the Android environment) in akquinet based project?

+6
source share

Source: https://habr.com/ru/post/949006/


All Articles