Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Event Handler = Failed test case
Event Handler = Failed test case [message #788869] Thu, 02 February 2012 10:05 Go to next message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
Registered: October 2011

Sometimes the Event Handler is used to handle cases when two scenarios can happen and both are correct.

The problem is that as soon as an Event Handler is called this test case is "Failed" according to the log file. When using continous integration and daily builds this is not good due to that you'll get a failed test case even though it's not failed.

Is there any solution for this? It's maybe possible to have a setting not handling manually inserted Event Handlers as failed, or something like that.

Regards Richard
Re: Event Handler = Failed test case [message #788908 is a reply to message #788869] Thu, 02 February 2012 11:17 Go to previous message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1612
Registered: July 2009
Senior Member

If both cases are correct, then it sounds like you need the reentry type "retry". This repeats the failed Test Step once the Event Handler has been executed.

You should choose a Test Step that ideally performs a check that will either be correct from the outset, or will be correct once the Event Handler has been executed. The check should reflect a situation that is correct - i.e. the one you require to continue.


TC: Deal with occasional overwrite dialog (for when saving asks if I want to overwrite the file)
- Check for non-existence of overwrite dialog (this is what I want to have)
--- if the dialog does exist (i.e. the check fails) then the Event Handler is activated. It can e.g. click "OK" in the window
--- once the Event Handler has been executed, the reentry type "retry" means that the originally failed Test Step is executed again.
--- now, the window is not there, so it is marked as successful.
If the dialog wasn't there in the first place, then the Test Step is marked as successful as well.

There is a cheat sheet on using Event Handlers, including a retry example. The documentation on the retry Event Handler is here.

Previous Topic:Cannot activate app with modal login
Next Topic:Dependencies error on Jubula source code
Goto Forum:

Current Time: Sun Jun 24 05:44:06 GMT 2018

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

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

Back to the top