Forum Discussion
nmrao
2 years agoChampion Level 3
Add Event Handler, select the "After Run TestStep" event.
And use below script, hope it will help
import com.eviware.soapui.impl.wsdl.teststeps.JdbcRequestTestStep
//Set the tablename to be removed
def tableName = 'DICTIONARY_CODE'
def currentStep = context.currentStep
if (currentStep instanceof JdbcRequestTestStep) {
// Custom logic to be executed for JDBC Request steps only
// Add your script code here
log.info("After Step Run Event - JDBC Request Step")
// Get the response of the JDBC step
def response = currentStep.testRequest.response.contentAsString
// Perform processing to remove table names from the response (you can customize this as per your requirements)
def modifiedResponse = response.replaceAll(/tableName\./, '')
// Set the modified response content
currentStep.testRequest.response.setContent(modifiedResponse)
}