Forum Discussion

jneth8's avatar
jneth8
New Contributor
6 years ago
Solved

How do I pass a test case while ignoring only certain failed test steps?

I have a test case that has multiple test steps. Two of them are calling a REST endpoint that was not developed by my organization. It's essentially an API for viewing a log. However, sometimes when ...
  • Lucian's avatar
    6 years ago

    Ok so it seems that you don't even have to use a try catch statement. Just disable the step for which you want to ignore the result and call it from a groovy script as:

     

    // Get the test step for which you want to ignore the result
    def testStep = testRunner.testCase.testSuite.testCases[ "NameOfYourTestCase" ].testSteps[ "NameOfYourTestStep" ]
    // Run the test step
    testStep.run( testRunner, context )

    I attached a demo project at https://github.com/lucadln/soapui/tree/master/IgnoreFailedStep .

     

    Cheers!