Forum Discussion

inkassso's avatar
inkassso
New Contributor
7 years ago

Run isolated test case copy in groovy

I have a modular test suite with parameterizable test cases.

When referencing a test case (SON) using "Run TestCase" test step in another test case (MOM), I can override the properties to be used with the SON test case, and after finishing, I can extract the properties from the SON test case to the test step scope of the MOM test case, and reference them in other test steps later. All that without actually modyfing the primary test case's properties, using an isolated copy instead.

 

Now I'm trying to perform a load test, where some of these test cases are used using the "Run TestCase" steps, but I need to execute some other ones before the load test (in Setup script) and after it (in Teardown script). I know how to run a test case using the run method, but I cannot find a way how to create an isolated copy of the SON test case, set its properties before executing and extract them after finishing, the same way the "Run TestCase" test step does in "Isolated copy" run mode.

    • inkassso's avatar
      inkassso
      New Contributor

      Yes, that does the work. I did not want to get too deep and copy the test case object myself, but it seems to be easier than I thought. Thanks!