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

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

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
Test count wrong   Message List  
Reply | Forward Message #76 of 94 |
I have found that the reported total number of tests run is wrong when
some of the tests fail. I see figures like "Runs: 1007/1000".

I'm running the tests using the graphical TestRunner in Eclipse 3.1.

Further investigation suggests that that total number of tests is only
wrong when tests fail (84 failures above). A dummy test which never
fails almost report the correct number of tests run.

I have created a simple case which replicates the problem (below),
based on using a test name which does not exist, so all tests fail.
I have also replicated the problem with a test case which fails about
10% of the time based on the value of Math.random().

With concurrentUsers=1, the count is correct. With concurrentUsers=2,
the count is only wrong occassionally. With concurrentUsers>=3 the
count is almost always wrong.

This isn't going to put me off using JUnitPerf. I downloaded for the
first time today, and used it to confirm that my code wasn't
threadsafe in no time flat. Thank you for creating a valuable tool.


Ken.




import junit.framework.Test;
import junit.framework.TestCase;

import com.clarkware.junitperf.LoadTest;

public class WrongCountTest extends TestCase {

public WrongCountTest(String name) {
super(name);
}

public static Test suite() {
int concurrentUsers = 10;
int iterations = 100;
Test test = new WrongCountTest("testDoesNotExist");
Test loadTest = new LoadTest(test, concurrentUsers, iterations);
return loadTest;
}
}







Fri Oct 21, 2005 4:47 pm

dankoxter
Offline Offline
Send Email Send Email

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

I have found that the reported total number of tests run is wrong when some of the tests fail. I see figures like "Runs: 1007/1000". I'm running the tests...
Ken Dobson
dankoxter
Offline Send Email
Oct 21, 2005
4:50 pm

... Thanks for the report, Ken. This is the first time I've heard of such a problem. I'll look into it before releasing the next version of JUnitPerf. I...
Mike Clark
clarkware
Offline Send Email
Oct 22, 2005
5:54 pm
Advanced

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