JUnitScenario 0.1 released

Discussions

News: JUnitScenario 0.1 released

  1. JUnitScenario 0.1 released (12 messages)

    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.

    Threaded Messages (12)

  2. JUnitScenario 0.1 released[ Go to top ]

    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
  3. JUnitScenario 0.1 released[ Go to top ]

    Besides scalability, it seems useful for integration and regression tests too, involving multiple use cases.

    Looks promising.
  4. JUnitScenario 0.1 released[ Go to top ]

    Thanks a lot ben,

    I'm working hard to make a good proejct out of it !
  5. 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 ;-)
  6. Hello... usually, all my tests are independant and can be launched at any time...
  7. Similar to JUnitPerf?[ Go to top ]

    It looks very interesting! But currently JUnitScenario seems to do more or less the same as JUnitPerf, + TestSuites.

    Or am I missing something?
  8. Similar to JUnitPerf?[ Go to top ]

    Similar but easiest for me... just an xml file to write.. 15 minutes and ready to launch
  9. Loops in performance tests[ Go to top ]

    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.
  10. Loops in performance tests[ Go to top ]

    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
  11. Loops in performance tests[ Go to top ]

    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
  12. JUnitScenario 0.1 released[ Go to top ]

    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
  13. JUnitScenario 0.1 released[ Go to top ]

    I think this has potential... Testing scenario's is always a problem. I will start experimenting with it