I've been using rest-assured under the impression that the server needs to be running in order to run my rest assured tests. Is this true?
Here's what one of my tests looks like:
@Test
public void shouldReturn401() {
when()
.get("http://localhost:8080/myapp/api/v1/documents")
.then()
.statusCode(401);
}
It works great when my server is running, but your documentation doesn't mention that the server has to be running.
Is rest-assured intended to be used without a server running? In my case my app is running in a Tomcat container.
Hi,
Yes, the server needs to be running. REST Assured is essentially an HTTP Client that communicates (tests) the API of a server.
Regards,
/Johan
Most helpful comment
Hi,
Yes, the server needs to be running. REST Assured is essentially an HTTP Client that communicates (tests) the API of a server.
Regards,
/Johan