在日志中隐藏密码

Hide passwords in logs

以下代码:

Background:
    * url "https://www.google.fr"

    Scenario: hide password
        Given path "login"
        And form field username = 'john'
        And form field password = 'secret'
        When method post
        Then status 200

给出以下输出:

10:38:34.710 request:
1 > POST https://www.google.fr/login
1 > Accept-Encoding: gzip,deflate
1 > Connection: Keep-Alive
1 > Content-Length: 29
1 > Content-Type: application/x-www-form-urlencoded; charset=UTF-8
1 > Host: www.google.fr
1 > User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_191)
username=john&password=secret

有没有办法在此处隐藏密码,同时将日志保持在 DEBUG 级别?如果这也意味着隐藏用户名,那不是问题。

如果 * configure report = { showLog: false } 还没有这样做,这可能需要成为功能请求。