Forum Discussion
I have the same problem as mentioned by you
YOu want the teststep to appear fail but still want the test to continue. You cannot use assert as it stops the step there. Testrunner.fail stops testcase execution
So what you can do is in each step take an arraylist
ArrayList err=[]
add all errors to it.. err.add (" error occured ")
in the last print this arraylist
err.each{log.info it}
so if there are any error they will be printed.
for marking the teststep as red that is failed
assert err.size()==0
Regards
Gaurav Khurana
- anusha217 years agoOccasional Contributor
thanks for the reply i am using the same
gauravkhuranawrote:I have the same problem as mentioned by you
YOu want the teststep to appear fail but still want the test to continue. You cannot use assert as it stops the step there. Testrunner.fail stops testcase execution
So what you can do is in each step take an arraylist
ArrayList err=[]
add all errors to it.. err.add (" error occured ")
in the last print this arraylist
err.each{log.info it}
so if there are any error they will be printed.
for marking the teststep as red that is failed
assert err.size()==0
Regards
Gaurav Khurana
Related Content
Recent Discussions
- 19 hours agogroovyguy