Forum Discussion

galina's avatar
12 years ago

Automatically creating test steps

Hello,

I'm very new to SoapUI so bear with me (pun intended).
Is there a way to configure a project in such a way that every configured REST will be added as a test step in a single test case?
What is the best to do it, a script run when the project is loaded? Maybe a script when a REST is defined?

Thanks in advance,
Galina

1 Reply

  • Hi Galina,
    Welcome to the club!!

    Unfortunately there is no way to add the test step for a new REST service in the project automatically.
    But yes, you can create a Groovy script to navigate the project tree and add the test steps for the REST requests for which test step doesn't exist, and you can use that groovy script as 'Save Script' (which is invoked with 'project' object) at project level, so that it is executed every time the project is saved.
    You can refer following post for some help on creating the test step through Groovy script: https://www.soapui.org/forum/viewtopic.php?f=2&t=4579

    Use project object instead of 'context.testCase.testSuite.project' in the second line in that post.

    Best Regards,
    Prakash
    SmartBear Sweden