Previously, we recorded a request to the database and a response from it. You can continue recording, or modify the transactions you already have. This step explains how you change the recorded responses.
1. Modify the virtual response
Stop the virtual service:
You cannot edit the virtual service while routing is enabled. Disable routing before editing the recorded response:
Select the response. The editor on the right will display the data you received form the database. Double-click a cell and change the value in it. Press Enter to confirm your changes. To open the table in a separate window, click .
Tip: To add more rows to the table, right-click somewhere within it and select Clone Row or Add Empty Row. You can also delete all selected rows by selecting Remove Rows.
Restart the virtual service.
2. Get the modified response
Open the JDBC Request test step again and send another request to the virtual service without changing the query. The service will return modified data:
If you send a request that was not recorded, the
Statement not virtualized error will occur.