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