我想測試一個REST資源:REST資源測試
@GET
@Path("/{dbName}")
@Produces(MediaType.APPLICATION_JSON)
public String getRequest(@PathParam("dbName") String dbName)
throws JSONException {
}
我想這樣做:
assert(someExpectedOutput,getRequest())
現在怎麼路徑將爲@Path註釋設置??
這可能有助於進行集成測試:http://www.baeldung.com/2011/10/13/integration-testing-a-rest-api/ – Eugen