Java 如何在ExtentReports日志中记录重新启动的请求和响应信息日志

Java 如何在ExtentReports日志中记录重新启动的请求和响应信息日志,java,rest-assured,extentreports,Java,Rest Assured,Extentreports,我使用rest assured lib和扩展报告进行报告 ValidatableResponse reponseManualLead = given().header("Accept", "application/json") .contentType("application/json").header("Authorization", access_token) .body(requestBody).log().body().w

我使用rest assured lib和扩展报告进行报告

ValidatableResponse reponseManualLead = given().header("Accept", "application/json")
                .contentType("application/json").header("Authorization", access_token)
                .body(requestBody).log().body().when()
                .put(losdevUrl + "/endUrl").then().log().all();
log().all():控制台日志中请求/响应的主要日志,我需要它在extentreport中登录,我们可以这样做吗

ExtentTestManager.getTest().log(LogStatus.INFO, "Response is:<br>" + "here");
extendettmanager.getTest().log(LogStatus.INFO,“响应为:
”+“此处”);
包含JSON请求/响应的建议用法是通过
markupulper
如文档中所示:

代码块将被美化并显示如下:

可能存在的副本
Markup m = MarkupHelper.createCodeBlock(json, CodeLanguage.JSON);
test.pass(m);

// shorthand
test.pass(MarkupHelper.createCodeBlock(json, CodeLanguage.JSON));