import static io.restassured.RestAssured.*; import static org.hamcrest.Matchers.*; public class RestAssuredExample { public static void main(String[] args) { given(). param("name", "John"). when(). get("/users"). then(). statusCode(200). body("name", equalTo("John")); } } RestAssured.baseURI = "https://api.example.com"; RestAssured.port = 8080; RestAssured.authentication = basic("username", "password");


上一篇:
下一篇:
切换中文