"Default Event Handler" is triggered instead of my customized handler [message #904493] |
Tue, 28 August 2012 14:28 |
Peter S. Messages: 6 Registered: August 2012 |
Junior Member |
|
|
Hi. I'm using Jubula v1.2.1 on an RCP-application, reading testdata from Excel-files.
My testcases have subtestcases and there are multiple nested checkStringValue-checks with "check failed"-handlers, mainly to ensure that only data of the current subtestcase is considered.
Those handlers worked fine and grew in number, but now there is always one teststep in my testsuite, that does not trigger my handler and immediately performs the reentry. Because of those missing steps, shortly afterwards my testrun is stopped due to an action error. Test results show, that the default event handler has been performed, despite there are customized event handlers everywhere.
If I'm varying the order of my testdata, the default event handler is often triggered on another position (few steps later or earlier).
Why could my handlers be ignored? How can it be, that the testcase I chose for the handler is not performed, but if I change the reentry type from CONTINUE to BREAK it does the break?
Thanks in advance, Peter
[Updated on: Tue, 28 August 2012 14:29] Report message to a moderator
|
|
|
|
|
Re: "Default Event Handler" is triggered instead of my customized handler [message #905487 is a reply to message #905453] |
Thu, 30 August 2012 13:20 |
Alexandra Schladebeck Messages: 1613 Registered: July 2009 |
Senior Member |
|
|
Hi Peter,
I must admit, your usage of BREAK did make me wonder. For anyone using unbound modules, break does exactly the same as a continue (as each unbound module Test Case contains exactly one Test Step):
TC1 Enter two values
- replace text (TC from unbound modules)
-- replace text (test step) ! ERROR
- replace text (TC from unbound modules)
-- replace text (test step)
If an error occurs at the place marked, then continue just carries on. Break leaves the test case in which the error occurred (i.e. the replace text from the ubms) and continues at the next one (i.e. the next replace text, so just the same as the continue). Return, on the other hand, leaves the test case in which the Event Handler is nested. This can be any test case in the hierarchy - you can achieve various different effects with return. The most useful one is to leave an independent "Use Case" if something has gone wrong and continue at the next independent "Use Case" for maximum test coverage, despite any errors. There's a cheat sheet that looks at this, as well as some documentation in the best practices section. It does tend to be something that is usually best understood as a part of a training course though, as it is one of the more complex areas of Jubula!
HTH,
Alex
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03339 seconds