本文整理汇总了Java中io.restassured.RestAssured.enableLoggingOfRequestAndResponseIfValidationFails方法的典型用法代码示例。如果您正苦于以下问题:Java RestAssured.enableLoggingOfRequestAndResponseIfValidationFails方法的具体用法?Java RestAssured.enableLoggingOfRequestAndResponseIfValidationFails怎么用?Java RestAssured.enableLoggingOfRequestAndResponseIfValidationFails使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类io.restassured.RestAssured
的用法示例。
在下文中一共展示了RestAssured.enableLoggingOfRequestAndResponseIfValidationFails方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Resource
import io.restassured.RestAssured; //导入方法依赖的package包/类
public Resource(HashMap<CommsRouterResource, String> state) {
RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
java.util.Map<String, String> env = System.getenv();
if (System.getProperty("autHost") == null) {
String host = env.get("AUT_HOST");
if (host != null) {
RestAssured.baseURI = host;
} else {
RestAssured.baseURI = "http://localhost:8080";
}
} else {
// you can specify it using -DautHost=http://localhost:8080
RestAssured.baseURI = System.getProperty("autHost");
}
RestAssured.basePath = "/comms-router-web/api";
this.state = state;
}
示例2: startApp
import io.restassured.RestAssured; //导入方法依赖的package包/类
@BeforeClass
public static void startApp() {
RestAssured.config = RestAssured.config().sessionConfig(new SessionConfig().sessionIdName("APPSESSIONID"));
RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
RestAssured.port = 9090;
Thread thread = new Thread(() -> {
try {
JettyApp.main(new String[]{Integer.toString(RestAssured.port)});
} catch (Exception e) {
e.printStackTrace();
}
});
thread.start();
// give the app time to spin up
try {
Thread.sleep(3000);
} catch (InterruptedException ex) {
Thread.currentThread().interrupt();
}
}
示例3: initClass
import io.restassured.RestAssured; //导入方法依赖的package包/类
@BeforeAll
public static void initClass(){
restController.setControllerPort(0);
restController.startTheControllerServer();
RestAssured.baseURI = "http://localhost";
RestAssured.port = restController.getControllerServerPort();
RestAssured.basePath = "/controller/api";
RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
}
示例4: setupSuite
import io.restassured.RestAssured; //导入方法依赖的package包/类
@BeforeSuite
public void setupSuite() {
LOGGER.info("Starting application...");
application.startServer();
RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
}
示例5: setXAuthIntegrationTest
import io.restassured.RestAssured; //导入方法依赖的package包/类
@Before
public void setXAuthIntegrationTest() {
RestAssured.port = port;
RestAssured.config().redirect(RedirectConfig.redirectConfig().followRedirects(false));
RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
}