Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Event Handler result(Condition missing)
Event Handler result [message #1745421] Mon, 10 October 2016 14:26 Go to next message
Jim 20100 is currently offline Jim 20100Friend
Messages: 69
Registered: June 2016
Member
Hello again,

It is really difficult to write test case without IF condition.

I use Event Handler instead but the problem is the TEST is marked as FAILED
if the Event Handler is launched.

Example: I want to get the sum of quantity for all parts in my TOTO group, check if the sum = 100

- Main test case:
init quantity = 0
Call testcase2, parameter path = path 1
Call testcase2, parameter path = path 2
check quantity = 100

- testcase2:
select path
check property group = TOTO
quantity = quantity + selected element quantity

Event handler of the testcase2:
Check failed
RETURN
no action at all

--------
Even if the my final check is ok, quantity = 100, test is marked as failed,
because the event handler was launch on some iteration, because some selected elements are of course not in the TOTO group.

Please help me to solve such problem.
I want that my event handler does not impact the final result of the test.



Re: Event Handler result [message #1745458 is a reply to message #1745421] Tue, 11 October 2016 08:02 Go to previous messageGo to next message
Oliver Goetz is currently offline Oliver GoetzFriend
Messages: 219
Registered: May 2011
Senior Member
Hi Jim,

try using the Reentry Type "Retry"
Regards
Oliver
Re: Event Handler result [message #1745459 is a reply to message #1745458] Tue, 11 October 2016 08:09 Go to previous messageGo to next message
Jim 20100 is currently offline Jim 20100Friend
Messages: 69
Registered: June 2016
Member
Hello,

The condition will always be wrong.
So I can "Retry" 10 or 100 times, result will be always wrong.

What I want to implement is:
if group=TOTO, then quantity += part quantity.

A simple condition like that without a FAILED test case. How to manage?

Re: Event Handler result [message #1745466 is a reply to message #1745459] Tue, 11 October 2016 08:58 Go to previous messageGo to next message
Oliver Goetz is currently offline Oliver GoetzFriend
Messages: 219
Registered: May 2011
Senior Member
Well,

that´s not how Jubula works (at least not the ITE). The Retry Event Handler can be e.g. started by a CheckFailed, then the Event Handler is executed and then the failed check will be executed again. If the condition is always wrong the check will never be executed successfully so this test case will always fail. Why is the condition always wrong? Isn´t there a way to get the condition to be true? Or is it because you do not know about the state your AUT is in when the test is executed? If so, why?
Jubula just checks if something is true or false, that´s it. Is the state of your test data unknown during test execution? If so, why?
Regards
Oliver
Re: Event Handler result [message #1745477 is a reply to message #1745466] Tue, 11 October 2016 11:26 Go to previous messageGo to next message
Jim 20100 is currently offline Jim 20100Friend
Messages: 69
Registered: June 2016
Member
Oliver,

I managed correctly now but it is really weird to implement such logic with the "Retry"

Store group name
Check group name != "MYGROUPPARAMETER"

in the event handler with RETRY
quantity+=quantity of the line
group name = "DONE"

NOT COMFORTABLE AT ALL...
When will you add a real "IF"

Rgds
Jim
Re: Event Handler result [message #1745478 is a reply to message #1745477] Tue, 11 October 2016 11:39 Go to previous messageGo to next message
Oliver Goetz is currently offline Oliver GoetzFriend
Messages: 219
Registered: May 2011
Senior Member
Hi,

glad to hear that you managed to implement your solution Smile
Feel free to enter an enhancement ticket in the Eclipse Jubula Bugzilla.
Regards
Oliver
Re: Event Handler result [message #1745856 is a reply to message #1745478] Tue, 18 October 2016 12:51 Go to previous message
Kevin Barbe is currently offline Kevin BarbeFriend
Messages: 64
Registered: July 2016
Member
Hi Jim,

regarding conditions we are facing the problem that Jubula is designed in a way that allows non-developers to use it very easily. Therefore we are currently not supporting all features some developers might wish to have to write tests. Furthermore we decided not to offer conditions in the past because if used incorrectly, usage can be very dangerous as it might result in non-deterministic tests.

However, we are actually currently in the process of implementing conditions, loops and iterations for the Jubula ITE. These will most likely be included in our next release which will be published later this year or in early 2017.

Nevertheless it already is possible to use conditions by using the Jubula API. You can find more information about the API in our developer documentation located here.

Best regards,
Kevin
Previous Topic:DRAG AND DROP in Trees
Next Topic:Select relative path in Tree - SERIOUS BUG
Goto Forum:
  


Current Time: Mon Sep 24 08:26:38 GMT 2018

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

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

Back to the top