Forum Discussion
richie
Community Hero
Hey mogranovitch,
If i understand what youre trying to do, youre trying to parameterise the database creds, right?
I know its possible, cos i did it before myself. However i checked the project that i did it in and its become corrupted so it doesnt load into ReadyAPI anymore and xmlspy reports too many substitution chars for me to fix (its an 80000 line .xml file).
I found an old version of my project that didnt include the parameterisation, so i was gonna attempt to reproduce what i did (cant actually remember how i did it), but because i couldnt remember the password value on my db connection i had to reset it in SSMS. HOWEVER, my ReadyAPI will NOT now connect to the database with the new password and ive done everything i can think of to fix (recreating a new connection with a new driver entry in the jdbc settings but it just wont connect). Im going to have to raise a query to resolve this myself.
To summarise, i still cant remember quite how i did this, however the link here -->> https://support.smartbear.com/readyapi/docs/testing/data-driven/types/jdbc.html indicates the connection string supports property expansions.
Normally id reproduce and provide step by step instructions, but as i cant cos of my connection problems, can you please provide screenshots of all your config to see if we cant sort you out?
Cheers,
Rich
If i understand what youre trying to do, youre trying to parameterise the database creds, right?
I know its possible, cos i did it before myself. However i checked the project that i did it in and its become corrupted so it doesnt load into ReadyAPI anymore and xmlspy reports too many substitution chars for me to fix (its an 80000 line .xml file).
I found an old version of my project that didnt include the parameterisation, so i was gonna attempt to reproduce what i did (cant actually remember how i did it), but because i couldnt remember the password value on my db connection i had to reset it in SSMS. HOWEVER, my ReadyAPI will NOT now connect to the database with the new password and ive done everything i can think of to fix (recreating a new connection with a new driver entry in the jdbc settings but it just wont connect). Im going to have to raise a query to resolve this myself.
To summarise, i still cant remember quite how i did this, however the link here -->> https://support.smartbear.com/readyapi/docs/testing/data-driven/types/jdbc.html indicates the connection string supports property expansions.
Normally id reproduce and provide step by step instructions, but as i cant cos of my connection problems, can you please provide screenshots of all your config to see if we cant sort you out?
Cheers,
Rich
mogranovitch
3 years agoOccasional Contributor
Hi Richie!
Thank you for your response.
Here are two screenshots of the PostgreSQL DB config screen:
1. Working with hard-coded password
2. Not working with parameterized password value. I tried both 'as is' value' and percent-encoded:
Thanks again!
- richie3 years agoCommunity HeroHey mogranovitch,
I dont think i used those property fields....i cant be sure...but i dont think i did.
Im curious, if in say the password property youve setup, instead of using an expansion, if you hardcode the value instead, do you connect ok? I think yousay you did, but just wanted to confirn
Have you tried just adding expansions into the dynamically generated fields (generated relative to which driver you specify) instead?
So in my sqlserver connection, when i select the driver, i get a host, and password, dbname and i think thats it (going off memory here)
So...in my sqlserver (if i did have a working db connection) in the password field did you try adding the expansion in there? i.e. ${#Project#password}
I "think" thats what i did when i did this before about 4 years ago. I had to switch to 2 different databases (local and remote) depending on which environment and whatever i did, it worked like a charm!
Cheers
Rich- mogranovitch3 years agoOccasional Contributor
Hi Rich!
Thanks again!
For your first question the answer is yes - it works fine if password is hard-coded.
For you second question the answer is no:
I had problems connecting to postgreSQL using user & password in the JDBC drivers configuration and was advised by Smartbear to not use it there.
I might try again to add new postgreSQL driver with "?user=<USER>&password=<PASSWORD>" at the end and try to use parameter there.
Regards,
Mikhail
Related Content
- 2 years ago
- 9 years ago