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: 1163
Registered: July 2009
Senior Member
Hello,

You can loop over a Test Case or Test Cases by adding multiple data sets to that Test Case:
http://help.eclipse.org/indigo/topic/org.eclipse.jubula.client.ua.help/html/manual/node129.html

You can also achieve the same effect by using central data sets instead:
http://help.eclipse.org/indigo/topic/org.eclipse.jubula.client.ua.help/html/manual/node119.html

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:
http://help.eclipse.org/indigo/topic/org.eclipse.jubula.client.ua.help/html/manual/node197.html

Best practices for Event Handlers:
http://help.eclipse.org/indigo/topic/org.eclipse.jubula.client.ua.help/html/manual/node315.html

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!
Alex

[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 Nov 26 16:50:24 GMT 2014

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

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