我正在尝试使用 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);
}
}