1

When I give postgres Db username and password from karateconfig.js getting authentication error var config = { env: env, db_username: karate.properties['karate.db_dev_username'], // username am passing from command db_password: karate.properties['karate.db_dev_password'], // password am passing from command } calling in the feature file as below

* def username = db_username
* def password = db_password
* def config = { username: username, password: password, url: 'jdbc:postgresql://...', driverClassName: 'org.postgresql.Driver' }

* def DbUtils = Java.type('utilities.DbUtils')
* def db = new DbUtils(config)

if i give the username and password in the feature file directly, it working fine.

  • org.graalvm.polyglot.PolyglotException: Failed to obtain JDBC Connection; nested exception is org.postgresql.util.PSQLException: FATAL: password authent ication failed for user "username" - This is the error am getting – user18943613 Feb 24 '23 at 20:53
  • sorry, you have to sort this out in your local env: https://stackoverflow.com/a/52078427/143475 – Peter Thomas Feb 25 '23 at 04:21

0 Answers0