Reputation: 39
Need it for connecting to the database in different environments(LOCAL, DEV, QA, etc) through Karate Framework. I have configured the JDBC Connection URL from karate-config.js file, but cannot expose the URL directly in the file since it has sensitive information such as username and password. Can you propose some way to use the URL and connect to the database in such a way that the password would not be exposed?
Upvotes: 1
Views: 1085
Reputation: 58098
Use environment variables passed into the test at run-time. This what most teams do: https://stackoverflow.com/a/52821230/143475
And if you really want to - you can call custom code to do encryption / decryption using Java interop: https://stackoverflow.com/a/61675057/143475
Upvotes: 0