jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@pivolis.com>
Subject RE: Junitperf on Cactus/Maven
Date Wed, 14 Apr 2004 08:10:28 GMT
Hi Darren,

Performing performance unit tests with Cactus is one area I'd also like
Cactus going into. However, I've not researched it yet. I remember this
page talking about this too: http://www.kimble.co.uk/papers/grinder.htm

I haven't run your code yet (I plan to). Have you been able to trace why
some calls take longer? Is it related to Cactus or to the app server?
Does it do this on the different containers?

The only issue I can see with Cactus would be if you run several tests
in parallel (that would cause problems because test results would
overwrite each other). But I don't think this is what you're doing.

WRT Maven reports: the results are the standard JUnit results, right? So
I guess the standard stylesheet would work. However I'm sure it can be
improved. It would be quite easy to provide an additional property of
the Maven Cactus plugin that allows to use the styledir attribute of the
junitreport task.


> -----Original Message-----
> From: Darren Hartford [mailto:dhartford@ghsinc.com]
> Sent: 07 April 2004 16:44
> To: Cactus Users List
> Subject: Junitperf on Cactus/Maven
> Hey all,
> Sharing my experience and looking for some feedback.
> I have successfully used JunitPerf on top of the cactus-maven-plugin.
> Unfortunately, the results give me some doubt (the timed measures seem
> sporadic) and I am hoping some of you more active testers could test
> give your feedback to share with the rest of us less experienced
> on how to do performance/stress in-container testing.  =-)
> Here is some sample code to get people rolling:
> ===code===
> public class SimplePerfTestCase extends ServletTestCase {
> 	public SimplePerfTestCase(String name) {
> 		super(name);
> 	}
> 	public static Test suite() {
> 	      TestSuite suite = new TestSuite();
> 	      suite.addTest(simpleLoadTest(5, 10, "testNothing"));
> 	      return suite;
> 	}
> 	public void testNothing(){
> 	  	assertTrue(true);
> 	}
>     public void setUp(){}
>     public void tearDown(){}
>     private static Test simpleLoadTest(int users, int iterations,
> testMethod) {
>     	//if average is more than 2 seconds (per user/iteration), fail
>             long maxElapsedTime = (2000 * users * iterations);
> 	        Test testCase = new SimplePerfTestCase(testMethod);
> 	        Test loadTest = new LoadTest(testCase, users,
>               Test timedTest = new TimedTest(loadTest,
> 	        return timedTest;
>       }
> }
> ===code===
> Unfortunately, I'm not sure how to extend the results to a report
> in Maven for the site generation task, but that's step two if this
> accurately measure performance.
> -D
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org

View raw message