Forum Discussion
I want to add one new test-step which will get some information from database when test-case is failed.
I want that this test-step locate into some place, and other test-cases call this test-step when it's necessary.
Thanks in advance!
http://www.soapui.org/Functional-Testing/controlling-flow.html
- nsalomatin10 years agoOccasional Contributor
Thanks for answering, but I think it's not resolve my problem, because in this case I need to add this conditional test-step into each other test-case. But I suggest, that I can to try resolve my problem using to "Events" (TestSuiteRunListener.afterTestCase) which will contain some script for calling jdbc-request if test-case is failed. Can you help me to do this script?
- JKambli10 years agoStaff
Hi,
To run a testStep after testCase in event handler,
def step = testRunner.testCase.getTestStepByName("Step Name")
step .run(testRunner, context)
You can add this in event handler, if that testCase has your step name it will run it.
Thanks,
Jeshtha- nsalomatin10 years agoOccasional Contributor
Thanks for answering!
But I want to run test-step in another test-suite, and execute this test-step only when testcase is failed.
I think, to my opinion this case is really helpfull and I will very glad if you resolve that problem :)
- nmrao10 years agoChampion Level 3
First of all, I was not sure how may cases you have make that change.
Alternatively you may call the jdbc query in the teardown script as well. You can try it and post the exact issue you are facing if there is any. But remember that you have to have this in all the similar cases.
Related Content
- 4 years ago
- 14 years ago