"Rest Assured" 请求日志:重复请求打印

"Rest Assured" requests log: Duplicate requests prints

我正在使用 InteliJ,虽然我不知道这是否重要...

当我调试使用“Rest Assured”的代码时,每个请求都被打印 两次 到 Intelij Run\Debug window.

例如:

@testR
Feature: tests Feature
Run Before Feature
**Request method:   POST**
Request URI:    https://10.188.10.30:443/auth/api/login
Proxy:          <none>
Request params: <none>
Query params:   <none>
Form params:    username=admin
                password=admin
**Request method:   POST**
Request URI:    https://10.188.10.30:443/auth/api/login
Proxy:          <none>
Request params: <none>
Query params:   <none>
Form params:    username=admin
                password=admin
10:34:44: Step: Given Login to tenant "system" with username "admin" and password "admin"(Scenario: New Login)

我将我的 requestSpecification 定义为:

    requestSpecification =
            RestAssured
                    .with()
                    .baseUri(baseUri)
                    .port(port)
                    .filter(new ResponseLoggingFilter())
                    .filter(new RequestLoggingFilter())
                    .log().all();

只使用其中一个

 .filter(new RequestLoggingFilter())
                .log().all();