我尝试使用NetBeans运行Restfuse测试。
NetBeans正在使用以下Maven命令来运行Restfuse测试:
mvn -Dtest=com.mycompany.RequestTest -DfailIfNoTests=false test-compile surefire:test
然而,HttpTest方法没有被调用:
@RunWith(HttpJUnitRunner.class)
public class RequestTest {
@Rule
public Destination destination;
@Context
private Response response;
public MatchRequestTest() throws UnknownHostException {
this.destination = getDestination();
this.callbackHost = InetAddress.getLocalHost().getHostAddress();
}
@HttpTest(method = Method.GET, path = "/request")
public void matchRequest() {
assertOk(response);
}
}
答案 0 :(得分:0)
使用"测试"前缀您的班级名称。即TestRequestTest。