Bugs item #1744626, was opened at 2007-06-28 19:06
Message generated for change (Comment added) made by jevonwright
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=1744626&group_id=61302

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: HtmlUnit plugin
Group: Release 1.4.1
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Matthew Jensen (mmj123)
Assigned to: Nobody/Anonymous (nobody)
Summary: Http 404's produce exceptions

Initial Comment:
In some test cases we expect 404's and would like to continue processing the 
web conversation as normal.  JWebunit 1.4.1 throws an exception on gotoPage 
(and other navigation methods) when the result is a 404.

JWebunit 1.2 did not do this, I believe this behavior should be at least 
optional.

Status code 404's are normal within out application and should be tested like 
any other page and doesn't indicate a fatal error.  This is true for all other 
http error codes, it should be up to the test to assert on the expected status 
code.

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

Comment By: Jevon Wright (jevonwright)
Date: 2008-11-18 15:01

Message:
Hi, in SVN trunk you can now test for 2xx, 4xx and 5xx errors:

    public void setUp() throws Exception {
        super.setUp();
        setIgnoreFailingStatusCodes(true);      // ignore failing status codes
        getTestContext().setBaseUrl(HOST_PATH);
    }

    public void testResponseCodes() {
        beginAt("/url");
        // test the response codes
        assertResponseCode(200);
        assertResponseCode(404);
        assertResponseCode(501);
    }


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

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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to