Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » while loop construct
while loop construct [message #703765] Wed, 27 July 2011 22:30 Go to next message
dee.baliga is currently offline dee.baligaFriend
Messages: 11
Registered: July 2011
Junior Member
How can we implement a while loop construct in Jubula?
Re: while loop construct [message #703776 is a reply to message #703765] Wed, 27 July 2011 22:38 Go to previous messageGo to next message
dee.baliga is currently offline dee.baligaFriend
Messages: 11
Registered: July 2011
Junior Member
I am concerned about HTML testing especially cases like

a) looping over the items in a list (e.g. dropdown) where the size of the list is unknown

b) while loops, if-then- else constructs;


Re: while loop construct [message #704014 is a reply to message #703776] Thu, 28 July 2011 07:23 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hello Dee,

As Jubula doesn't use a scripting language, we don't have the keywords *while* or *if* etc. As I mentioned in the other forum (http://www.eclipse.org/forums/index.php/t/224225/), we do have ways of dealing with various test scenarios that produce a similar effect to while loops or if constructs using data sets and event handlers.

As a general rule, you do need to know how many times you want to perform something. It may be possible to write tests that deal with unknown amounts of entries e.g. in a combo box, but I'd recommend choosing specific data to work with so that you know exactly what you expect as a result - there is much to be said for deterministic tests.

Kind regards,
Alex
Re: while loop construct [message #704168 is a reply to message #704014] Thu, 28 July 2011 10:54 Go to previous messageGo to next message
Marc Missing name is currently offline Marc Missing nameFriend
Messages: 8
Registered: July 2011
Location: Gent, Belgium
Junior Member
Hello Alex, and Dee,

Your right Alex when you say a loop can be 'simulated' by using a data set.
However, it feel it would be a great step forward if you could use an 'if' check for a test step.
+ I now use a data set to check if menu item are present or not, however the number of menu items change according to the view you choose in the application. So you need to make different data sets for each view you want to test. Using XLS files, this is not that much work: just copy and paste. However it is discouraged to use XLS files and use central data sets, but then you cannot simply copy and paste... (sorry if I am wrong, but did not find a way so far). So it would be much easier (and the data would be more centralized then) to just add another column in the data set to use as a check if a test for menu entry must be done.

Anyone other ideas?

Cheers,
Marc
Re: while loop construct [message #704279 is a reply to message #704168] Thu, 28 July 2011 13:02 Go to previous messageGo to next message
Marc Missing name is currently offline Marc Missing nameFriend
Messages: 8
Registered: July 2011
Location: Gent, Belgium
Junior Member
Hi guys,

Did manage to solve it by making 1 data set containing a ViewABC_Exits and ViewABC_Enabled column for each view and using those columns for the different View menu tests. Of course, a lot of tests are now done for nothing (knowing in advance that menu item will never be there in a certain view).

Cheers
Re: while loop construct [message #895408 is a reply to message #703765] Thu, 12 July 2012 18:28 Go to previous messageGo to next message
Beilei Wang is currently offline Beilei WangFriend
Messages: 1
Registered: July 2012
Junior Member
Hi Guys,

I am really new to Jubula and I have a question about looping that needs your help:
is it possible to loop a set of test steps instead of just one test step? My automation requires to repeat set of test steps with different input, is it possible to do it in Jubula?

Thanks,

Beilei
Re: while loop construct [message #895857 is a reply to message #895408] Mon, 16 July 2012 10:38 Go to previous message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi,

Yes, that is possible. You'll need to reference the parameters for the data you want to loop over and use data sets for the loops.

I believe that the "First Steps" Cheat sheet (startable from the help menu) uses data sets, maybe it would be worth looking at that.

HTH,
Alex
Previous Topic:[SOLVED]Tests pass in ITE, but fail in testexec: Unsupported Language
Next Topic: Problem installing jubula: standalone setup.exe fails
Goto Forum:
  


Current Time: Fri Mar 29 14:18:47 GMT 2024

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

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

Back to the top