Forum Discussion
mrugglesaz
11 years agoOccasional Contributor
SagarArcher wrote: Hi,
Any update on this? I have been facing the JDBC issues [the JDBC connection doesnt change to the new environment after switching it from the previous environment].
I am using the latest SOAP UI version [4.6.0].
Please let me know if there is any workaround for the same.
Regards,
Sagar
Sagar:
I figured out a workaround of my own. Here's the procedure that I use. One caveat, you must use the Environments functionality to make this work.
1. I created all of my JDBC connection strings per environment as Global Properties. The Password must be included in the string.
2. I have a Groovy script that uses case statements that assign the appropriate JDBC connection string to a Project Proeprty for the Environment selected in the drop-down.
3. I added a data pull in the Connection String field in the JDBC step that gets the string from the Project Property. The Password field is left blank in the JDBC step.
4. I added a line in the TearDown Script to set the Project Property to blank again after the test is executed to remove the Password from it.
The design above keeps sensitive database passwords out of the project and keeps them in Global Properties, which are specific to a user's local copy of SoapUI. This is the best design I could think of to get around the disconnect between Environments and JDBC steps. The above design does work and I have updated all of my tests to use it. Now when I select a new Environment value from the drop-down, my Groovy script takes cares of assigning the appropriate JDBC connection string for that environment. Give it a try and let me know if you have any questions.
Mark A. Ruggles
Related Content
- 10 years ago
- 9 years ago
- 5 years ago
- 5 years ago
Recent Discussions
- 5 days ago
- 10 days ago