akquinet (Android with test archetype) - unit tests are not executed

荒凉一梦 提交于 2019-12-08 19:38:07

问题


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?

来源:https://stackoverflow.com/questions/17545188/akquinet-android-with-test-archetype-unit-tests-are-not-executed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!