Home > SoapUI > TestCase and TestStep execution with Groovy…

TestCase and TestStep execution with Groovy…

TestCase looping
for( c in 0..5 )
testRunner.runTestStepByName( “My Request” )
Running Testcase from a Groovy Script
 
def testCase = testRunner.testCase.testSuite.testCases[“Another TestCase”]
def properties = new com.eviware.soapui.support.types.StringToObjectMap()
def async = false
testCase.run(  properties, async )
Stopping a TestCase
 
There are three different ways to stopping a TestCase
1.testRunner.cancel( “I’m getting tired” )
2.testRunner.fail( “It didn’t work” )
3.throw new Exception( “Trowing Exceptions..” )
Disable test items via Groovy
 
testRunner.testCase.disabled = true|false
testRunner.testCase.testSteps[“name of teststep”].disabled = true|false
testRunner.testCase.testSuite.disabled = true|false
Asserting a testCase run in groovy
 
testRunner.testCase.testSteps[“name of teststep”].assertions[“name of assertion”].disabled = ..
Categories: SoapUI
  1. kA
    June 9, 2016 at 3:02 PM

    Is there any way in which i could run just couple of test steps in the test case and not the whole test case ??

  2. June 14, 2018 at 10:47 PM

    It’s genuinely very complicated in this active life to listen news on Television, thus
    I just use internet for that purpose, and obtain the most recent news.

  3. June 22, 2023 at 1:23 PM

    This site was… how do I say it? Relevant!! Finally I’ve
    found something which helped me. Kudos!

  4. July 1, 2023 at 11:44 AM

    Hello there! This article could not be written much better!
    Looking at this article reminds me of my previous roommate!

    He constantly kept preaching about this. I am going to
    forward this article to him. Fairly certain he’ll have a very good read.
    Thanks for sharing!

  5. July 1, 2023 at 12:23 PM

    When someone writes an piece of writing he/she keeps the plan of a user in his/her brain that how a user can know it.

    So that’s why this post is great. Thanks!

  1. February 5, 2023 at 10:30 AM

Leave a comment