Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » How to run test suite/test case many times
How to run test suite/test case many times [message #1258512] Thu, 27 February 2014 08:07 Go to next message
Richard Skoog is currently offline Richard Skoog
Messages: 46
Registered: October 2011
Member
Hi,

What is the easiest way of running a test suite/test case many times?
Let's say that I want to run a test suite/test case one hundred times in a repeat. What is the easiest way of doing this?

Regards Richard
Re: How to run test suite/test case many times [message #1259265 is a reply to message #1258512] Fri, 28 February 2014 02:31 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1092
Registered: July 2009
Senior Member
Hi Richard,

To repeat a Test Case multiple times, you could:
a) use a dataset to loop over the Test Case. Even if the Test doesn't actually require data, you could enter a "dummy" step that has a parameter e.g. =V1. Then you could add multiple datasets.
b) add the Test Case manually multiple times to another Test Case / Test Suite.

For Test Suites, the only way to repeat them is to add them to a Test Job. If you aren't working with multiple AUTs though, I'd stick to using Test Cases in a Test Suite.

Best regards,
Alex
Re: How to run test suite/test case many times [message #1276674 is a reply to message #1259265] Mon, 24 March 2014 18:27 Go to previous messageGo to next message
David Hickernell is currently offline David Hickernell
Messages: 63
Registered: October 2012
Member
Sorry this thread is almost a month old; I've been off the forums for a while. If you still need a relatively concise way to repeat a test case a large number of times, here's another way to do it, provided your Jubula version is recent enough to support functions:

1) Create a test case (TC1) whose first step is to set a variable (e.g. LOOPVAR) to the number of times you want to run your test case.
2) Add a second test step (not a test case) to TC1 that checks for $LOOPVAR to be less than or equal to 0.
3) Create a second test case (TC2) that calls your test case.
4) Add a step to TC2 that stores the value
?sub($LOOPVAR,1)
in LOOPVAR.
5) In TC1, add TC2 as an Event Handler for event type "Check Failed" and reentry type "RETRY", with a maximum number of retries greater than the initial value of LOOPVAR.

This should repeat your test case the correct number of times before finally passing. It has the advantage of not requiring a huge dataset or a huge test case/suite.
Re: How to run test suite/test case many times [message #1276966 is a reply to message #1276674] Tue, 25 March 2014 05:29 Go to previous message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1092
Registered: July 2009
Senior Member
Nice solution David!
Previous Topic:Can't execute test on AUT launched from Eclipse
Next Topic:Check dateformat using slash
Goto Forum:
  


Current Time: Tue Jul 29 16:59:31 EDT 2014

Powered by FUDForum. Page generated in 0.02223 seconds