The scub team is pleased to announce 0.1 release of JUnitScenario. JUnitScenario is a tool to simulate real life usage of applications. It allows you to describe scenarios that are composed of unit tests calls and simulate several users following those scenarios.
For example, this scenario.xml file defines the cashier scenario:
<scenario name="cashier" users="20" loops="500">
<task JUnitClass="org.mybank.MyFirstTest" JUnitMethod="testCreateAccount" wait="10"/>
<task JUnitClass="org.mybank.MyFirstTest" JUnitMethod="testDipositMoney" wait="10"/>
<task JUnitClass="org.mybank.MyFirstTest" JUnitMethod="testWithdrawMoney" wait="50"/>
</scenario>
The goal is to have a very easy way to use your unit tests to test your application scability.
This document describes how to setup the example: http://junitscenario.sourceforge.net/?action=example
Visit JUnitScenario homepage at http://junitscenario.sourceforge.net/
This release is just a first shot; we are planning to refactor it, develop an eclipse plug-in to easily build scenarios, store tests in a database for statistics.
-
JUnitScenario 0.1 released (12 messages)
- Posted by: Stephane TRAUMAT
- Posted on: February 14 2005 10:14 EST
Threaded Messages (12)
- JUnitScenario 0.1 released by Ben Switzer on February 15 2005 10:29 EST
- JUnitScenario 0.1 released by Henrique Steckelberg on February 15 2005 10:55 EST
- JUnitScenario 0.1 released by Stephane TRAUMAT on February 15 2005 14:56 EST
- How to relate test cases together? by Sriram Gopalan on February 15 2005 12:17 EST
- How to relate test cases together? by Stephane TRAUMAT on February 15 2005 14:57 EST
- Similar to JUnitPerf? by Timo Rantalaiho on February 15 2005 12:26 EST
- Similar to JUnitPerf? by Stephane TRAUMAT on February 15 2005 14:57 EST
- Loops in performance tests by John Hurst on February 15 2005 19:21 EST
- Loops in performance tests by Stephane TRAUMAT on February 16 2005 02:22 EST
- Loops in performance tests by Cedric Beust on February 16 2005 15:42 EST
- JUnitScenario 0.1 released by Youssef Mohammed on February 16 2005 14:19 EST
- JUnitScenario 0.1 released by Marc de Kwant on February 17 2005 05:25 EST
-
JUnitScenario 0.1 released[ Go to top ]
- Posted by: Ben Switzer
- Posted on: February 15 2005 10:29 EST
- in response to Stephane TRAUMAT
Looks cool. Will have to try it out tonight when I get a moment.
I like the fact that you're building on top of JUnit. I can easily resue my JUnit tests to get a better picture of the app's scability. (Of course, there are many more factors than this involved) No need to rewrite tests, ala JMeter. (Although JMeter has its place too)
Nicly done.
Ben -
JUnitScenario 0.1 released[ Go to top ]
- Posted by: Henrique Steckelberg
- Posted on: February 15 2005 10:55 EST
- in response to Ben Switzer
Besides scalability, it seems useful for integration and regression tests too, involving multiple use cases.
Looks promising. -
JUnitScenario 0.1 released[ Go to top ]
- Posted by: Stephane TRAUMAT
- Posted on: February 15 2005 14:56 EST
- in response to Ben Switzer
Thanks a lot ben,
I'm working hard to make a good proejct out of it ! -
How to relate test cases together?[ Go to top ]
- Posted by: Sriram Gopalan
- Posted on: February 15 2005 12:17 EST
- in response to Stephane TRAUMAT
I assume that the three JUnit test cases in the scenario would be related to each other. For example, the testCreateAccount would create an account (duh!) which would need to used in the subsequent Diposit (sic) and Withdraw test cases. How does that happen? In other words, how can I specify the common data between the test cases?
Of course, I could just RTFA ;-) -
How to relate test cases together?[ Go to top ]
- Posted by: Stephane TRAUMAT
- Posted on: February 15 2005 14:57 EST
- in response to Sriram Gopalan
Hello... usually, all my tests are independant and can be launched at any time... -
Similar to JUnitPerf?[ Go to top ]
- Posted by: Timo Rantalaiho
- Posted on: February 15 2005 12:26 EST
- in response to Stephane TRAUMAT
It looks very interesting! But currently JUnitScenario seems to do more or less the same as JUnitPerf, + TestSuites.
Or am I missing something? -
Similar to JUnitPerf?[ Go to top ]
- Posted by: Stephane TRAUMAT
- Posted on: February 15 2005 14:57 EST
- in response to Timo Rantalaiho
Similar but easiest for me... just an xml file to write.. 15 minutes and ready to launch -
Loops in performance tests[ Go to top ]
- Posted by: John Hurst
- Posted on: February 15 2005 19:21 EST
- in response to Stephane TRAUMAT
Hi,
If you are looping to do performance testing, do you provide a way to vary the data being used in each iteration?
I've found before that due to caching etc, a simple loop repeating the same transaction does not make a very effective/realistic performance test.
John Hurst
Wellington, New Zealand. -
Loops in performance tests[ Go to top ]
- Posted by: Stephane TRAUMAT
- Posted on: February 16 2005 02:22 EST
- in response to John Hurst
Hello,
I loop indeed and I only call unit test without any parameter.
Your idea is interesting.. thanks. I will try to see that.
Stéphane TRAUMAT -
Loops in performance tests[ Go to top ]
- Posted by: Cedric Beust
- Posted on: February 16 2005 15:42 EST
- in response to John Hurst
Hi,If you are looping to do performance testing, do you provide a way to vary the data being used in each iteration?I've found before that due to caching etc, a simple loop repeating the same transaction does not make a very effective/realistic performance test.
This is pretty simple to do with TestNG, by the way:
public class ATest {
@Test parameters = { "param" }
public void aTest(String p) {
}
}
<test>
<parameter name="param" value="test1" />
<class>
<include name="com.foo.ATest.class" />
</class>
</test>
<test>
<parameter name="param" value="test2" />
<class>
<include name="com.foo.ATest.class" />
</class>
</test>
And if you want to do something more fancy, you can also do this programmatically.
--
Cedric -
JUnitScenario 0.1 released[ Go to top ]
- Posted by: Youssef Mohammed
- Posted on: February 16 2005 14:19 EST
- in response to Stephane TRAUMAT
I really can't understand how to test the scalability by looping thru some unit tests for certain time!
AFAIK, that Unit Testing is all about "Testing some unit (class)" trasparently from other units ( using mocks or whatever). In this context, I can't see this useful. However it could be useful if someone have done functional testing using JUnit (which is not common) so he can simply complie some scenarios whith this tools.
Regards,
Youssef -
JUnitScenario 0.1 released[ Go to top ]
- Posted by: Marc de Kwant
- Posted on: February 17 2005 05:25 EST
- in response to Youssef Mohammed
I think this has potential... Testing scenario's is always a problem. I will start experimenting with it