How to get database password in ReadyAPI?
I have some JDBC tasks which have a working database connection. I want to connect to a database with a groovy script but cannot do it due to an authentication error.
The connection string of the database has the username=OneDbUser and password = password_value. In the password field, the password field is hidden behind circles. I could not connect to the database with a groovy script or with the GUI client for the database. In both cases, I used the username and password given in the connection string. It looks like the password in connection string is different from the hidden password in the password field.
So, how do I find out what is the actual password? How do I connect to a DB with a groovy script?
Solved! Go to Solution.
While this question is not directory related to ReadyAPI, I understand, please check with DBA to get it or reset. Password had to reset time to time.
You can get lot of sample for db connection on the net using groovy.
Depending on it, the connection string will change and respective driver library has to used.
I believe, the tool has support for some databases out-of-the-box(please check documentation) or $READYAPI_HOME/lib directory.
If a particular library is not supported OOTB, one can download the respective driver , copy it under $READYAPI_HOME/bin/ext and restart the tool. This is applicable to both jdbc step / groovy script step as well.
Since you mentioned that ablee to connect to db, you may not need to download any drivers. But that is just information only.