Forum Discussion
SmartBear_Suppo
Alumni
11 years agoHi,
It sounds like you would like to validate the data against the wsdl file before submitting any requests? If so, then you should create a Groovy script test step before the request test steps and validate the data, if any of the data is invalid then disable the proceeding test steps and then enable them again after the data is read from the datasource. You can disable them in a groovy script test step by:
You can enable by doing the same thing with just using the for loop and setDisabled(false).
Regards,
Marcus
SmartBear Support
It sounds like you would like to validate the data against the wsdl file before submitting any requests? If so, then you should create a Groovy script test step before the request test steps and validate the data, if any of the data is invalid then disable the proceeding test steps and then enable them again after the data is read from the datasource. You can disable them in a groovy script test step by:
def tesSteps = testrunner.testCase.getTestStepList()
for (testStep in testSteps)
{
if (testStep.getName() != "MyDataSourceLoopName" || testStep.getName() != "MyDataSource" )
{
testStep.setDisabled(true)
}
}
You can enable by doing the same thing with just using the for loop and setDisabled(false).
Regards,
Marcus
SmartBear Support