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
Threaded test doesn't end   Message List  
Reply | Forward Message #34 of 94 |
Re: [junitperf] Re: Threaded test doesn't end

rogler_frank wrote:
>
> I left out the threadedTest and it runs ok.
> Meanwhile, I've got another problem: I try to test a web application:
> I login to the application and get a cookie. My idea was to login with
> three different users and to communicate independently. The result I
> get is the message 'User changed' from my application. So it seems,
> that there are not really three instances of a (httpunit-)client
> running at my side. I'm not sure, whether it is an http-unit issue.
> But it seems to me like a problem of threading.
>
> What do you (or anybody else) think about it?
>

Is the user configured in setUp()? If so, you'll want to use the
TestMethodFactory to ensure that each thread spawned by the LoadTest
gets its own instance of the test fixture. For example:

public static Test suite() {
int users = 3;
Test test = new TestMethodFactory(YourTest.class, "yourTestMethod");
LoadTest loadTest = new LoadTest(test, users);
return loadTest;
}

Otherwise each thread of the LoadTest will attempt to share the fixture.
Perhaps that's why you're not observing three distinct instances of
the HttpUnit client.

Mike

--
Mike Clark
http://clarkware.com
(303) 589-3812




Wed Jul 9, 2003 4:03 pm

clarkware
Offline Offline
Send Email Send Email

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

Hi, Im just playing with threaded tests. I try to simulate 5 users each running in a special thread. But I don't see the result I think I should see :-) The...
Rogler, Frank
rogler_frank
Offline Send Email
Jun 26, 2003
6:13 pm

Hi Frank, ... Interesting. When I run it through the graphical runner, it consistently returns 10. Can you tell me more about how you're running it through...
Mike Clark
clarkware
Offline Send Email
Jun 26, 2003
7:42 pm

... sometimes 0. ... there ... observing. ... Hi Mike, I left out the threadedTest and it runs ok. Meanwhile, I've got another problem: I try to test a web...
rogler_frank
Offline Send Email
Jul 9, 2003
1:38 pm

... Is the user configured in setUp()? If so, you'll want to use the TestMethodFactory to ensure that each thread spawned by the LoadTest gets its own...
Mike Clark
clarkware
Offline Send Email
Jul 9, 2003
4:17 pm
Advanced

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