Modify the test case result depending on the last retry result
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Modify the test case result depending on the last retry result
Hej
with reference to how to control the test run described in: (https://support.smartbear.com/readyapi/docs/functional/steps/groovy.html#verifying-response)
I would like to control the test case status using groovy scripts not failing test run but a single test case, using the testcase option would either stop the test case on first test step failed or would indicate that the test have ended regardless if some of test steps have failed or after some retries, or even is some haven't bee run.
the required scenario is the following:
Having test case TC1
Test step 1 : Do something
Test Step 2: if Test step one failed and max retry < 5 wait 20s then go for Test step 1
Test step 3 ....
Test step Las: 3 set the test case status depending on last run of Test Step1 , Step3...
Thanks in advance
- Labels:
-
Function Tests
-
Reporting
-
Scripting
-
Test Results
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @pskitsme92. Are you familiar with the Conditional GoTo Test Step? It lets you define a number of XPath expression conditions to jump to the specified test steps if the condition evaluates to True. If I'm reading your requirement correctly, I think it could help you. Let me know what you think! Thanks,
Joe
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @joejoyce
Yes I am and I'm using it in my test project, By try and error, we have figured out that setting "testRunner.fail("Adding fail Message for some reason") would fail the test step and test case. And the test will continue to next test step. That would be nice if it was documented some where and added to the threads I have referred to in my question.
in the project xml file you can find:
"<con:testCase id="8c01e5b5-34cd-4b63-af54-bab0b8fdc61c" discardOkResults="false" failOnError="false" failTestCaseOnErrors="false""
what does failOnError="false" vs failTestCaseOnErrors="false"" can be used for in the sense of controlling the test flow??
Best regads pskitsme92
