报告用 @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");
    }
  }