Forum Discussion

FC's avatar
New Contributor
2 years ago

SoapUI - LoadTest ¬ SetupScript



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
    New Contributor

    Tried the below two but still hitting same issue

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




    • JuZ0's avatar

      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")