On 21/09/2009, Brian Sweeney <[email protected]> wrote: > Hi guys, > > I've been playing with different structures for my tests. I have a single > unit test under a thread group so the results are in a nice form for another > tool. I've set up the thread group to run the test 10 times and noticed the > first run is usually about 200x slower than subsequent runs. Has anyone seen > this? Is there a work-around? > > I have an idea about how to fix this, but I'm hoping somebody else has > addressed this already. Thoughts?
The JUnit sampler only includes the elapsed time for the method call in the sample result, so any start-up overhead must be in the method that is being called (not in setUp/tearDown). This is different from JUnit3, which reports the overall time. Note that a single sampler will re-use the same instance (within a thread), which is deliberately different from the way JUnit behaves. Different samplers use different instances, even if the same method is being tested. So you could see what happens if you have 10 separate samplers running the same method. The test class is not unloaded, so any class fields (static variables) will remaind at the end of a test. If there is any one-time setup of data this should show up if you re-rerun the test in the GUI without exitting JMeter. > Thanks, > Brian > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

