Maven won't run tests

孤者浪人 提交于 2019-12-03 07:26:45
Noah

You need to add the maven surefire plugin to run the tests. The configuration can be found here: http://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html

UPDATE:

Here's a configuration that I've been using with specs/junit.

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.8.1</version>
                <configuration>
                    <includes>
                        <include>**/*Spec.*</include>
                        <include>**/*Test.*</include>
                    </includes>
                </configuration>
            </plugin>

UPDATE 2:

The naming convention is Test, so change PropertyTests to PropertyTest.

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