testRunner.results giving incorrect count for results
Hi,
This is my first post in the forum and am hoping its in accordance with the forum's norms.
I am using Ready API 2.2.0 and am facing this weird situation wherein I am getting incorrect number of results in the testRunner.results List when the number of test steps is greater than 5.
As a sample test I have created a Empty project with one TestSuite with one TestCase with 7 Test Steps (all Groovy Scripts with no code inside, just blank script files) named Step1, Step2..., Step7. (same happens with 6 steps)
I am using this code to get the name and test step outcome in the TestCase's Tear Down script:
log.info "testRunner.results.size() = " + testRunner.results.size()
log.info "testRunner.resultCount = " + testRunner.resultCount
for(result in testRunner.results){
log.info "Name: " + result.testStep.name + " || " + "Result: " + result.status
}
and I get the following outcome in case there are 7 test steps:
Fri Nov 10 17:40:38 IST 2017:INFO:testRunner.results.size() = 5 Fri Nov 10 17:40:38 IST 2017:INFO:testRunner.resultCount = 7 Fri Nov 10 17:40:38 IST 2017:INFO:Name: Step3 || Result: OK Fri Nov 10 17:40:38 IST 2017:INFO:Name: Step4 || Result: OK Fri Nov 10 17:40:38 IST 2017:INFO:Name: Step5 || Result: OK Fri Nov 10 17:40:38 IST 2017:INFO:Name: Step6 || Result: OK Fri Nov 10 17:40:38 IST 2017:INFO:Name: Step7 || Result: OK
and when the number of test steps in the test case is 5, this is the output:
Fri Nov 10 17:42:19 IST 2017:INFO:testRunner.results.size() = 5 Fri Nov 10 17:42:19 IST 2017:INFO:testRunner.resultCount = 5 Fri Nov 10 17:42:19 IST 2017:INFO:Name: Step1 || Result: OK Fri Nov 10 17:42:19 IST 2017:INFO:Name: Step2 || Result: OK Fri Nov 10 17:42:19 IST 2017:INFO:Name: Step3 || Result: OK Fri Nov 10 17:42:19 IST 2017:INFO:Name: Step4 || Result: OK Fri Nov 10 17:42:19 IST 2017:INFO:Name: Step5 || Result: OK
with 6 steps, this is the output:
Fri Nov 10 17:44:19 IST 2017:INFO:testRunner.results.size() = 5 Fri Nov 10 17:44:19 IST 2017:INFO:testRunner.resultCount = 6 Fri Nov 10 17:44:19 IST 2017:INFO:Name: Step2 || Result: OK Fri Nov 10 17:44:19 IST 2017:INFO:Name: Step3 || Result: OK Fri Nov 10 17:44:19 IST 2017:INFO:Name: Step4 || Result: OK Fri Nov 10 17:44:19 IST 2017:INFO:Name: Step5 || Result: OK Fri Nov 10 17:44:19 IST 2017:INFO:Name: Step6 || Result: OK
The results list somehow seems to have only the last 5 results in it. Can someone throw some light on whether I am doing something wrong or if this looks like a bug?
Any thoughts are much appreciated.
Regards,
Pankaj
Hi,
Please check that the max results in the test case options is greater than 5, as by default when test cases are created max results are set to 5.
https://support.smartbear.com/readyapi/docs/soapui/ui/case.html#options
Regards,
Marcus
SmartBear Support