akquinet (Android with test archetype) - unit test

2019-06-20 02:46发布

I've generated 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

  1. a parent project,
  2. myproject project with the actual Android application and
  3. myproject-it with the integration tests.

When I add the following test class into the myproject-it project and run mvn install, I don't get a test failure message.

import org.junit.Assert;
import org.junit.Test;

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

Hence, the unit test is not executed.

What can I do in order to run unit tests (tests, which do not depend on the Android environment) in a project based on akquinet?

0条回答
登录 后发表回答