I am already using Error log in logback-test.xml
I am also using log modifier to hide secret keys in request and response.
Everything in karate report looks good and all data is masked as expected like the header name is "Authorization" which is coming as masked in karate report in this variable "authToken" value is getting passed from karate-config.js
. In cucumber report too same header is masked but cucumber report is showing additional information and displaying karate-config.js
file contents which has all data. What can I do to hide this information in cucumber report?
I have tried this as well it doesn't display request and response but still prints all contents of karate-config.js
in cucumber report.
This only happens for the first feature file when project executes it displays the contents of karate-config.js
//ConfigurereportstonotshowrawHTTPrequests/responses,andtoskipnon-BDD(asterisk)steps
karate.configure('report',{showLog:false,showAllSteps:false})
EDITED
Thanks Peter atleast now I understood the issue. We have to call one feature file from Karate-config.js once only for whole project. To do that we are doing below
var sample = karate.callSingle('classpath:sample/test.feature@test1',config);
As we are calling this from karate-config.js so in cucumber report it is showing the complete list of variables and then calling this feature file once. This contains very sensitive data which we can't show in report. I tried adding annotation @report=false
with scenario in test.feature@test1
it is still showing the variables list. As we are passing arguments as config
in callSingle
it will show list of variables in report. Please guide on this how to tackle such issue.