我在maven上课:
src/test/java/StartupTest.java
拥有此代码:
public class StartupTest {
public void testStartup(){
assert false: "Just for fun.";
}
}
如果我做mvn clean test
,就会失败,就像被开除一样!
Failed tests: StartupTest.testStartup(): Just for fun.
如果我添加此依赖项:
<dependency>
<groupId>com.canoo.webtest</groupId>
<artifactId>webtest</artifactId>
<version>3.0</version>
</dependency>
测试不再执行。
有什么想法吗?
答案 0 :(得分:0)
好的,不得不排除junit
<dependency>
<groupId>com.canoo.webtest</groupId>
<artifactId>webtest</artifactId>
<version>3.0</version>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>