Ask a Question

SoapUI - LoadTest ¬ SetupScript

FC
New Contributor

SoapUI - LoadTest ¬ SetupScript

Hi

 

New to SOAPUI and have a load test which i want to run a test step once at startup.

 

Should be simple but getting the following

FC_1-1678116433092.png

How do perform this using the Setup Script under a load test?

 

Any help greatly appreciated..

 

 

2 REPLIES 2
FC
New Contributor

Tried the below two but still hitting same issue

testRunner.testCase.testSuite.testCases["yours-here"].run( null, true )

 testRunner.runTestStepByName("session_Open")

 

FC_0-1678177717177.png

 

JuZ0
Occasional Contributor

Load test set setup script is invoked with following available variables that can be utilized in scripts: log, context, loadTestRunner

 

You can use 'context' variable to reach the test suite in current context:

def testSuite = context.TestSuite

then you can use this defined testSuite variable to do anything you want with the test suite. If you want to reach some specific test case you could use:

testCase = testSuite.getTestCaseByName("your test case name")
cancel
Showing results for 
Search instead for 
Did you mean: