Forum Discussion

FC's avatar
FC
New Contributor
2 years ago

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

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

 

Any help greatly appreciated..

 

 

2 Replies

  • FC's avatar
    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")

     

     

    • JuZ0's avatar
      JuZ0
      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")