Bugs item #974065, was opened at 2004-06-16 12:21
Message generated for change (Settings changed) made by jimweaver
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=974065&group_id=61302

Category: None
>Group: None
>Status: Pending
Resolution: None
Priority: 5
Submitted By: Matt Read (mattread)
Assigned to: Nobody/Anonymous (nobody)
Summary: Change to HttpUnitDialog behaviour

Initial Comment:
I used to be able to do something like this:

HttpUnitDialog hud = new HttpUnitDialog(getBaseUrl(), 
getTestContext() );
hud.clickLink("somelinkId");

And then manipulate the HttpUnitDialog in order to 
simulate multiple people navigating the website. This no 
longer seems to work. The page that I'd navigated to 
prior to calling this code gets modified. Is this a bug or 
intentional behaviour?



----------------------------------------------------------------------

Comment By: Jim Weaver (jimweaver)
Date: 2004-09-13 17:54

Message:
Logged In: YES 
user_id=619947

Sorry for the long delay in getting back to this.  I have
never tried to do anything like what you are attempting
here, so I'm taking a stab in the dark, but try using a
different TestContext with your threads.  If your webserver
uses cookies to identify/track sessions, then using the same
test context might cause it to associate both dialogs with
the same session.  From your example it looks like you are
using the same TestContext on both threads - but maybe
that's just from the way it's snipped together...


----------------------------------------------------------------------

Comment By: Matt Read (mattread)
Date: 2004-07-27 11:44

Message:
Logged In: YES 
user_id=579210

Sorry, a few typos in the first sentence, it should have read:

Yep, this stopped working when I upgraded. The first thread 
no longer seems to be on the Delete page when I try 
submitting (where I've marked AAA).


----------------------------------------------------------------------

Comment By: Matt Read (mattread)
Date: 2004-07-27 11:38

Message:
Logged In: YES 
user_id=579210

Yep, how this stopped working when I upgraded. The first 
thread no longer seemed to be on the Delete page when I 
tricked submitting where I've marked AAA.

public void testExample() {

        getTestContext().setBaseUrl
("http://localhost:8082/myWebApp";);

        // go to delete page
        beginAt("/home.do");
        clickLink(DELETE_LINK_ID);

        // in separate thread - delete the first item on the list
        HttpUnitDialog hud = new HttpUnitDialog(
                "http://localhost:8082/myWebApp/home.do";,
                getTestContext());
        hud.clickLink(DELETE_LINK_ID);
        hud.submit("submit"); // submit effective date page

        // AAA: first thread, try to delete the item which should 
now be gone
        submit("submit"); // submit effective date page
        assertTextPresent("That company no longer exists in 
the system");

}

----------------------------------------------------------------------

Comment By: Jim Weaver (jimweaver)
Date: 2004-06-28 18:33

Message:
Logged In: YES 
user_id=619947

Can you post a small testcase that doesn't work anymore, and
include the code for getBaseUrl and getTestContext?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=974065&group_id=61302


-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
Jwebunit-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to