Forum Discussion
Try this:
def request = context.testCase.testSteps['JDBCQuery'].query
- JHunt6 years agoCommunity Hero
Or this:
def request = context.testCase.testSteps['JDBCQuery'].jdbcRequest.requestContent
- Prabaharan6 years agoContributor
Hi JHunt,
Thanks for your quick reply. Both your script works fine for saving the JDBC request to a file.
But I have implemented this project as a data driven for which few the values are fetched from an external file. The dynamic values are stored as a jdbc parameters.
Your scipt works fine for saving the jdbc request but saving the query without dynamic values.
Kindly refer the attachments.
- JHunt6 years agoCommunity Hero
I checked the source code, and there is no available method you can call to get the query including the values. The values are added to a PreparedStatement in the middle of a protected method.
PreparedStatement is used to protect your database. Since they are designed to get around the limitations, and especially the risks, of using only Strings to send data to your database, it's not possible to convert them to String form.
Related Content
- 2 years ago
Recent Discussions
- 15 years ago