question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to hide secret data present in karate-config.js getting shown in cucumber report.

See original GitHub issue

We have a requirement where one feature file needs to be called only once for whole project and we are calling it from karate-config.js but in cucumber report the secret values which are very sensitive are coming and we have to avoid that due to security reasons. How to fix it.

I am submitting a sample code where sample flow I have replicated with minimal code for you review.

Please use command mvn test -Dtest=ExamplesTest to run the project and it will generate a cucumber report. In that report where a feature from karate-config.js is getting called before that all values from that file are getting displayed. We can’t remove code from karate-config.js as our this feature file needs to be called only once in whole project and we have around 43 feature files in this project. sample.zip image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:19 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
ptrthomascommented, Nov 15, 2021

@Madiha20 thanks for the update

I’ll consider adding a new property to the configure report system for e.g something like this, so showCallArg will be a new option, and will be set to false when * configure report = false is set.

karate.configure('report', { showLog: true, showAllSteps: false, showCallArg: false });
0reactions
ptrthomascommented, May 9, 2022

1.2.0 released

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to hide karate-config.js data coming in cucumber report?
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...
Read more >
Karate | Test Automation Made Simple.
src/test/java | +-- karate-config.js +-- logback-test.xml +-- ... Cucumber JSON reports can be generated, except that the extension will be .json instead of ......
Read more >
Karate API Testing Tool Cheat Sheet - DevQA.io
I've created this cheat sheet to help anyone who is involved in testing APIs, giving examples of how to use the Karate tool....
Read more >
5 easy steps to integrate Cucumber Report with Karate and ...
Go to the karate-config.js file and set environment-specific variables like base-url, api-key, username, etc. (as required) that will change depending on ...
Read more >
How to work with Karate Config.js to Switch Env in Karate API ...
✓ What is Karate Configuration? Karate expects a file called karate-config.js to exist in the class path and contains a function JavaScript.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found