I've just started working on creating my own custom plug-in for Jameleon that uses the Selenium libraries to interact with the browser. I've made several custom tags and can execute a test case just fine, as long as all of the tags result in a pass. When a tag fails, however (either by using fail() or by some assert method in testBlock()), the whole test case stops dead, complaining about the single failure.
I would prefer it if, after hitting a failure, the test case would continue, regardless of the potential problems caused by that step not functioning properly. This way I'd be able to catch any further errors as well.
I do not mean that I am expecting a certain step to fail (otherwise I would use an "expected failure" tag of some sort), but rather that if I hit an unexpected failure, I'd still like the test case to execute to completion.
Does Jameleon (or the Selenium plug-in/session tag) have a way (an attribute, config setting, or flag of some sort?) to keep executing the test case regardless of failures, while still outputting the failure information?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I've just started working on creating my own custom plug-in for Jameleon that uses the Selenium libraries to interact with the browser. I've made several custom tags and can execute a test case just fine, as long as all of the tags result in a pass. When a tag fails, however (either by using fail() or by some assert method in testBlock()), the whole test case stops dead, complaining about the single failure.
I would prefer it if, after hitting a failure, the test case would continue, regardless of the potential problems caused by that step not functioning properly. This way I'd be able to catch any further errors as well.
I do not mean that I am expecting a certain step to fail (otherwise I would use an "expected failure" tag of some sort), but rather that if I hit an unexpected failure, I'd still like the test case to execute to completion.
Does Jameleon (or the Selenium plug-in/session tag) have a way (an attribute, config setting, or flag of some sort?) to keep executing the test case regardless of failures, while still outputting the failure information?
Thanks.
The simplest way to do this would be to encapsulate your test in a <postcondition/> tag. For example,
<testcase>
<postcondition>
<selenium-session ...>
<do-something/>
<do-something-else/>
<do-yet-another-action/>
...
</selenium-plugin>
</postcondition>
</testcase>
All of your error messages will a "POSTCONDITION: " prefix. Let me know if this is acceptable.
Yeah, that seems to work how I was hoping. Thanks for your prompt response! :)