Search the web
Sign In
New User? Sign Up
junitperf
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
LoadTest and JUnitTestAll   Message List  
Reply | Forward Message #26 of 94 |
Re: LoadTest and JUnitTestAll

--- In junitperf@y..., Mike Clark <mike@c...> wrote:
> I think I understand your intent. You can do something like this:
>
> protected static Test makeLoadTest() {
> int users = 1;
> int iterations = 1;
>
> Test loadTest = new LoadTest(JUnitTestAll.suite(), users, iterations);
> return loadTest;
> }
>
> Notice, however, that a TestFactory isn't used here so you may end up
> with concurrency issues in test fixtures. There's no way to use a
> TestFactory on a suite containing multiple tests.
Thank you.

> But what puzzles me is why you'd want to run your entire suite of tests
> en masse as load tests. Instead, I'd recommend picking certain test
> case methods that have quantifiable performance and scalability
> requirements, then use JUnitPerf to test those. That's generally a
> better use of your time and JUnitPerf was designed to help you in these
> situations.
I was involved in the implementation of one API. All seemed to be fine with
JUnit tests and, even, with JUnitPerf tests (but not very well thought tests).

But when using this API in production environment, in some circumstances, one
strange error arose (this indicates that the unitary tests chosen for JUnitPerf
tests, wasn't the good ones).

By inspecting the code (and a little lucky), the problem was found and fixed...
but, usually, this doesn't work. If you know what you are looking for, it's
simpler to find out it.

After that, I was trying to figure out what would be happen if I were running
performance (and general) tests in an authomated way, for the problems to arise,
instead of waiting for them to be reported... or have a hard work looking for
them (and having a lucky day to build the right performance tests).

In fact, I had a very complete set of unitary tests but didn't discover the
problem. If I could run all my unitary tests in a parallel way, would the
problem be (authomatically) exhibited? If so, I would adopt a new habit: to run
performance unitary tests, besides of my unitary tests, so some unexpected
problems get discoverd :-)

Summarizing, I was trying to apply the same philosophy of unitary tests to
performance unitary tests: to run all the tests, all the time to find the errors
you don't expect.

Once more, thank you very much.




Wed Dec 4, 2002 12:24 pm

apetit_yms
Offline Offline
Send Email Send Email

Forward
Message #26 of 94 |
Expand Messages Author Sort by Date

Hello, I've been using successfully JUnitPerf for iterating JUnit test (with JUnitPerf's LoadTest) when all of them are defined in the same java source file...
apetit_yms
Offline Send Email
Dec 2, 2002
10:52 am

Sorry: - JVM 1.2.2 - JUnit 3.7 - JUnitPerf 1.8...
apetit_yms
Offline Send Email
Dec 2, 2002
10:54 am

... Please explain what you mean by running it as a simple JUnit test class, as opposed to the way that doesn't seem to work. Mike -- Mike Clark ...
Mike Clark
clarkware
Offline Send Email
Dec 2, 2002
7:39 pm

... Hello again, and thank you for your interest, I will try to explain my problem, not in english but in "java" ;-) To do so, I've uploaded a zip file...
apetit_yms
Offline Send Email
Dec 3, 2002
11:52 am

... Yes, I understand the problem now. ... The TestFactory class expects the supplied test (e.g. JUnitTestAll.class) to have testXXX() methods. It then makes...
Mike Clark
clarkware
Offline Send Email
Dec 3, 2002
3:52 pm

... Thank you. ... I was involved in the implementation of one API. All seemed to be fine with JUnit tests and, even, with JUnitPerf tests (but not very well...
apetit_yms
Offline Send Email
Dec 4, 2002
12:24 pm

... It depends on the problem. ... My experience has been that performance and scalability problems are best tested at the use case level. It's the assembly...
Mike Clark
clarkware
Offline Send Email
Dec 5, 2002
4:22 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help