Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Looping constructs
Looping constructs [message #701849] Mon, 25 July 2011 17:17 Go to next message
dee.baliga is currently offline dee.baligaFriend
Messages: 11
Registered: July 2011
Junior Member
I understand that Jubula supports looping constructs but can u pls provide an example to demonstrate its usage?
Re: Looping constructs [message #702244 is a reply to message #701849] Tue, 26 July 2011 06:23 Go to previous message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1612
Registered: July 2009
Senior Member

You can loop over a Test Case or Test Cases by adding multiple data sets to that Test Case:

You can also achieve the same effect by using central data sets instead:

Other looping constructs can be used for the following sorts of examples (taken from the FAQs):

* "Wait until the text Loaded appears in the status bar"
* "If the checkbox isn't selected, then select it"
* "If this action isn't successful the first time, take some (or no) action and try again." The number of tries can be configured.
* "If this action isn't successful, then execute some other action(s)." The action(s) executed after the error can be any actions - for example taking a screenshot or restarting the application.

The Event Handlers are the items you will need to add this kind of logic to your tests. The following sections in the manual are worth reading:

General information on Event Handlers:

Best practices for Event Handlers:

There is also a cheat sheet in the ITE that deals with two examples of Event Handlers - the first example is for dealing with unknown statuses in the test (i.e. an error has occurred and the AUT should be cleaned up and the test started from the next use case). The second example deals with the "retry" Event Handler, which can be used to deal with known or planned deviations (i.e. the test should run successfully whether the save prompt dialog comes or not).

Further to this, we do also offer a specific training session in Event Handlers - you can contact our sales team if you're interested.

Hope that helps!

[Updated on: Mon, 09 January 2012 07:35]

Report message to a moderator

Previous Topic:Problem Object Mapping Open/New File Menus
Next Topic:Adding Event Handlers
Goto Forum:

Current Time: Wed Jun 20 23:02:35 GMT 2018

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

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

Back to the top