自动生成基于Maven工程的Junit的单元测试文件
<dependency>
<groupId>com.github.onlypiglet</groupId>
<artifactId>autojunit-core</artifactId>
<version>1.0.1-alpha</version>
</dependency>
<plugin>
<groupId>com.github.onlypiglet</groupId>
<artifactId>autojunit</artifactId>
<version>1.0.1-alpha</version>
<executions>
<execution>
<phase>generate-test-sources</phase>
<goals>
<goal>genjunit</goal>
</goals>
</execution>
</executions>
</plugin>
在Pom.xml中添加相应插件,并执行mvn clean generate-test-sources
。