Jasper175
15 years agoFrequent Contributor
Disable TestCase or Skip
Hello - I need help to disable a TestCase based on a condition.
Below is a snippet idea of what I want to accomplish - where I use an IF statement where if it's "true" then I need a particular TC to be disabled OR not be ignored when running a full project.
def response = context.expand( '${getCustomerFullInfo - Request 1#Response#declare namespace m=\'http://cleveland.vonage.com/services/servicelayer\'; //m:GetCustomerFullInfoResponse[1]/m:customer[1]/m:customerId[1]}' )
if((response > ''))
{
// Here I need to disable a TC named "TC-1"
}
Example Setup:
1. Groovy Script w/ IF statements
2. TC-1
3. TC-2
New TestSuite
If the condition is true 'TC-1' will be skipped or disabled and run TC-2.
I have the IF statements working but when running at the project level - SoapUI wants to run everything anyway.
Thank you,
Rob
Below is a snippet idea of what I want to accomplish - where I use an IF statement where if it's "true" then I need a particular TC to be disabled OR not be ignored when running a full project.
def response = context.expand( '${getCustomerFullInfo - Request 1#Response#declare namespace m=\'http://cleveland.vonage.com/services/servicelayer\'; //m:GetCustomerFullInfoResponse[1]/m:customer[1]/m:customerId[1]}' )
if((response > ''))
{
// Here I need to disable a TC named "TC-1"
}
Example Setup:
1. Groovy Script w/ IF statements
2. TC-1
3. TC-2
New TestSuite
If the condition is true 'TC-1' will be skipped or disabled and run TC-2.
I have the IF statements working but when running at the project level - SoapUI wants to run everything anyway.
Thank you,
Rob