报告使用 @Deployment
注解的方法的不正确签名。
根据 Arquillian 文档,Arquillian 测试类应该使用具有特定签名的 public static 方法定义部署归档,并使用 @Deployment
注解。
示例:
//此测试用例无法被 Arquillian 启动,Deployment 方法不为 static
@RunWith(Arquillian.class)
public class SomeTest {
@Deployment
public JavaArchive createDeployment() {
throw new UnsupportedOperationException("Implement me");
}
@Test
public void testSomething() {
Assert.fail("To be implemented");
}
}
在应用快速修复后:
@RunWith(Arquillian.class)
public class SomeTest {
@Deployment
public static JavaArchive createDeployment() {
throw new UnsupportedOperationException("Implement me");
}
@Test
public void testSomething() {
Assert.fail("To be implemented");
}
}