xxxxxxxxxx
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import io.restassured.RestAssured;
import static io.restassured.RestAssured.*;
import static org.hamcrest.Matchers.lessThan;
public class VerifyResponseTime {
@BeforeClass
public void setBaseUri () {
RestAssured.baseURI = "http://localhost:3000";
}
@Test
public void responseTime () {
given()
.when ()
.get ("/posts")
.then ()
.time (lessThan (10l));
}
}