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

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

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 #19 of 94 |
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
(for instance, in TestPortalGroupMngr: see code bellow).

What I'm trying to do is to use my JUnitTestAll.java JUnit TestCase as "suite()"
for all my unitary tests to be imported into one single suite source.

The problem with this is that the JVM, at runtime, it complains about there is
no test in JUnitTestAll... but there is if I run JUnitTestAll as a simple JUnit
test class!!!

If I try to run a JUnit TestCase class (for instance TestPortalGroupMngr)
instead of JUnitTestAll, then JUnitPerf runs everithing right.

Could you tell me what I'm doing wrong?

If you need more information about what I'm really doing, please make me know.

BR.

public class TestPortalGroupMngr extends TestCase {
...
public static Test suite() {
return new TestSuite(TestPortalGroupMngr.class);
}

public void testApplicationIsInGroup(){
...
Assert.assertTrue(true);
}
}

public class JUnitTestAll extends TestCase {
...
public static Test suite() {
TestSuite suite = new TestSuite();

suite.addTestSuite(TestPortalGroupMngr.class);
suite.addTestSuite(TestPortalUserMngr.class);

return suite;
}
...
}

public class JUnitPerfLoadTest {
public static final int NUMBER_OF_USERS = 10;
public static final int NUMBER_OF_ITERATIONS = 10;

public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(makeLDAPLoadTest());
return suite;
}

protected static Test makeLDAPLoadTest() {
int users = NUMBER_OF_USERS;
int iterations = NUMBER_OF_ITERATIONS;

Test factory = new TestFactory(JUnitTestAll.class);
// Test factory = new TestFactory(TestPortalGroupMngr.class);
Test loadTest = new LoadTest(factory, users, iterations);
return loadTest;
}
...
}

public class JUnitPerfTestAll {
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(JUnitPerfLoadTest.suite());
return suite;
}

public static void main(String[] args) {
junit.textui.TestRunner.run(suite());
}
}




Mon Dec 2, 2002 10:51 am

apetit_yms
Offline Offline
Send Email Send Email

Forward
Message #19 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