Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » "Default Event Handler" is triggered instead of my customized handler(Reentry type is considered, the testcase chosen is not)
"Default Event Handler" is triggered instead of my customized handler [message #904493] Tue, 28 August 2012 14:28 Go to next message
Peter S. is currently offline Peter S.Friend
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 #905356 is a reply to message #904493] Thu, 30 August 2012 08:17 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi,

Could you post the HTML report for the test where the default handler is being activated instead of the custom Event Handler? My two thoughts are that either a) the custom Event Handler is nested in the wrong place (either too general or too specific) or b) the error occuring is not the one that the Event Handler is designed to react to. Either way, (or if there's another point that I've not considered), the HTML result will help to see the structure and hierarchy.

Best regards,
Alex
Re: "Default Event Handler" is triggered instead of my customized handler [message #905453 is a reply to message #905356] Thu, 30 August 2012 12:12 Go to previous messageGo to next message
Peter S. is currently offline Peter S.Friend
Messages: 6
Registered: August 2012
Junior Member
Hi, Alex!

I tried to avoid the reentry type BREAK wherever possible (managed to replace it by CONTINUE at two of my handler's) and now it works.
Realized that the BREAK reentry type doesn't follow the behavior that I expected it would (stop the one testcase where it is configured), but looks like it stops the whole sequence of testcases of the current data record.

Shouldn't this be, according to the User Manual http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jubula.client.ua.help%2Fhtml%2Fmanual%2Fnode216.html, the behavior of type RETURN?

Maybe you could provide some closer explanation of those similar reentry types, because what I experienced on several occasions left me behind in surprise.

Thanks in advance, Peter

[Updated on: Thu, 30 August 2012 12:13]

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 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
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

Re: "Default Event Handler" is triggered instead of my customized handler [message #907508 is a reply to message #905487] Tue, 04 September 2012 06:40 Go to previous messageGo to next message
Peter S. is currently offline Peter S.Friend
Messages: 6
Registered: August 2012
Junior Member
Thank you, Alex!

That's very helpful. I haven't experienced any more problems with Event Handlers so far.

Best regards, Peter
Re: "Default Event Handler" is triggered instead of my customized handler [message #1131162 is a reply to message #907508] Thu, 10 October 2013 08:54 Go to previous message
Sascha Winkler is currently offline Sascha WinklerFriend
Messages: 30
Registered: March 2013
Member
hey,

so return seems to work if I define several test cases. In my test, there was only one test case with different data stes. I want to run the same test case with the next data set when the check fails. Is there a solution for this, too?
Otherwise i will define a own test case for every data set as workaround.

greetings
EDIT: oh sorry i postet the reply in the wrong (referenced) thread Sad

[Updated on: Thu, 10 October 2013 08:56]

Report message to a moderator

Previous Topic:Selecting parent in SWT tree
Next Topic:Behavior of BREAK is not as expected when suite and testcases are configured differently
Goto Forum:
  


Current Time: Sat Apr 20 12:16:44 GMT 2024

Powered by FUDForum. Page generated in 0.03139 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top