Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » 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 13:07 Go to next message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
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 07:31 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
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 22:27 Go to previous messageGo to next message
David Hickernell is currently offline David HickernellFriend
Messages: 85
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 09:29 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Nice solution David!
Re: How to run test suite/test case many times [message #1717604 is a reply to message #1276966] Tue, 15 December 2015 09:07 Go to previous messageGo to next message
Michael Renker is currently offline Michael RenkerFriend
Messages: 26
Registered: December 2015
Location: Germany
Junior Member
hello,

I was trying to work out the 5 steps described by David Hickernell (Mon, 24 March 2014 22:27),
got until step 5. If i try to add TC2 as an EH in TC1 it wont work i cant select TC1 nor TC2.

The problem could be that step 3 is wrong...
3) Create a second test case (TC2) that calls your test case

In step 3 i just need to "Reference Existing Test Case" right? Which is TC1...

Or how to I call TC1 from TC2?
Am I going into the right direction?

Tnx for the help
Re: How to run test suite/test case many times [message #1717608 is a reply to message #1717604] Tue, 15 December 2015 09:26 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Michael,

Can you post an example (an image or a project) of where you've got to so far?

Thanks,
Alex
Re: How to run test suite/test case many times [message #1717611 is a reply to message #1717608] Tue, 15 December 2015 09:48 Go to previous messageGo to next message
Michael Renker is currently offline Michael RenkerFriend
Messages: 26
Registered: December 2015
Location: Germany
Junior Member
No Message Body
Re: How to run test suite/test case many times [message #1717612 is a reply to message #1717611] Tue, 15 December 2015 09:48 Go to previous messageGo to next message
Michael Renker is currently offline Michael RenkerFriend
Messages: 26
Registered: December 2015
Location: Germany
Junior Member
No Message Body
Re: How to run test suite/test case many times [message #1717613 is a reply to message #1717612] Tue, 15 December 2015 09:48 Go to previous messageGo to next message
Michael Renker is currently offline Michael RenkerFriend
Messages: 26
Registered: December 2015
Location: Germany
Junior Member
No Message Body
Re: How to run test suite/test case many times [message #1717614 is a reply to message #1717613] Tue, 15 December 2015 09:49 Go to previous messageGo to next message
Michael Renker is currently offline Michael RenkerFriend
Messages: 26
Registered: December 2015
Location: Germany
Junior Member
Here are the 5 steps

tnx
  • Attachment: 5 steps.zip
    (Size: 189.24KB, Downloaded 121 times)

[Updated on: Tue, 15 December 2015 09:50]

Report message to a moderator

Re: How to run test suite/test case many times [message #1717631 is a reply to message #1717614] Tue, 15 December 2015 12:10 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Michael,

Thanks for the examples. I've added an image of what I think David meant. I've also added a project which should be importable into the 8.2.1 version of Jubula (available on the testing portal in the beta section).

index.php/fa/24331/0/

The idea is:
- you have a test case that sets a variable then checks whether a condition is met
- this test case uses another test case as a retry event handler. the event handler does two things:
-- it executes your test case (the one you want to loop over)
-- it subtracts one from the variable so that the condition you check at the beginning is met at some point in time.

Hope this helps!
Alex
  • Attachment: example.png
    (Size: 7.60KB, Downloaded 718 times)
  • Attachment: 5steps_1.0.zip
    (Size: 2.21KB, Downloaded 209 times)
Re: How to run test suite/test case many times [message #1717640 is a reply to message #1717631] Tue, 15 December 2015 13:59 Go to previous messageGo to next message
Michael Renker is currently offline Michael RenkerFriend
Messages: 26
Registered: December 2015
Location: Germany
Junior Member
It works. Thank you. Big Help.
Re: How to run test suite/test case many times [message #1717652 is a reply to message #1717640] Tue, 15 December 2015 14:50 Go to previous message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Michael!

Glad I could help Smile

Best regards,
Alex
Previous Topic:Problems with the lock manager
Next Topic:Jubula - Client API
Goto Forum:
  


Current Time: Thu Apr 18 14:21:00 GMT 2024

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

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

Back to the top