zhyt
14 years agoNew Contributor
soapUI+groovy+different test cases
Hi all.
I've got a problem while writing automated groovy script in soapUI.
I have a next structure of project:
----here some WLSDs
----TestSuite1
----------TestCase1
---------------MainGroovyScript (this is a main automation script)
---------------TestStep1.1
---------------TestStep1.2
......
----------TestCase2
---------------TestStep2.1
---------------TestStep2.2
......
----TestSuite2
----TestSuite3
Now problems:
- in my MainGroovyScript when I call testRunner.runTestStepByName("TestStep1.1") I get an error "No such property testRunner for script1 ....". Well, I looked for this problem in your forum and found an answer - update soap to new nightly build. For some reasons I cannot do this. BUT when I use Runner.runTestStepByName("...") rather than testRunner.runTestStepByName("...") my testStep runs as it should. Goblin magic . Can somebody explain me the difference?
- now I want to run the TestStep1.1 --> TestStep1.2 --> TestStep2.1 --> TestStep2.2 from my MainGroovyScript. So I have to write something like this:
But when I write this - i get an error: "No such property testCase for script1..." or some times when I play with testCase.testSuite.project.... - i get a NullPointerException. Can you help me with running different test steps from different test cases?
Best regards, Evgenii.
I've got a problem while writing automated groovy script in soapUI.
I have a next structure of project:
----here some WLSDs
----TestSuite1
----------TestCase1
---------------MainGroovyScript (this is a main automation script)
---------------TestStep1.1
---------------TestStep1.2
......
----------TestCase2
---------------TestStep2.1
---------------TestStep2.2
......
----TestSuite2
----TestSuite3
Now problems:
- in my MainGroovyScript when I call testRunner.runTestStepByName("TestStep1.1") I get an error "No such property testRunner for script1 ....". Well, I looked for this problem in your forum and found an answer - update soap to new nightly build. For some reasons I cannot do this. BUT when I use Runner.runTestStepByName("...") rather than testRunner.runTestStepByName("...") my testStep runs as it should. Goblin magic . Can somebody explain me the difference?
- now I want to run the TestStep1.1 --> TestStep1.2 --> TestStep2.1 --> TestStep2.2 from my MainGroovyScript. So I have to write something like this:
Runner.runTestStepByName(TestStep1.1)
Runner.runTestStepByName(TestStep1.2)
// problem
Runner.testCase.testSuite.getTestCaseByName("TestCase2").runTestStepByName("TestStep2.1")
Runner.testCase.testSuite.getTestCaseByName("TestCase2").runTestStepByName("TestStep2.2")
But when I write this - i get an error: "No such property testCase for script1..." or some times when I play with testCase.testSuite.project.... - i get a NullPointerException. Can you help me with running different test steps from different test cases?
Best regards, Evgenii.