Is it possible to list all the test cases/targets in all scenarios in LoadUI NG Pro startup script?
I have a groovy script which creates a file that is used by a datasource teststep as part of the loadtest. Each record in the file can only be used once so it is shared.
fileName = loadTestRunner.loadTest.testCase.getTestStepByName("DataSource").getDataSource().getFileName()
I used the above code to get the filename for the datasource and it works fine in the startup script or the LoadTestRunListener.beforeLoadTest event when there is only a single testcase in the loadtest.
I have started using the Pro version which means my load test can have multiple scenarios each of which can have multiple testcases. I assume the datasource 'shared' option only works for threads/virtual users in single testcase. Which means I need to be able to create a different file for each testcase. I would like to be able to access the DataSource test step for each of these testcases. So I need some way of looping through all the scenarios in a load test and in turn all the testcases/targets in each scenario.
Looking at the apidocs I see no mention of scenarios. In the groovy startup script there is no code completion for anything related to scenarios.
testcase = loadTestRunner.getLoadTest().getTestCase().getName()
If I try to get a testcase from the loadTest object in the script it just returns one of the testcases.
Is there any method I can call in groovy to get all of the scenarios/testcases?