Menu

#160 Few small improvements to PseudoServer

closed
None
5
2014-07-23
2006-10-11
No

Lately I'm using HttpUnit's PseudoServer heavily to
test some HTTP client-server interactions. I've found
that it would be convenient to add "setResource(String,
WebResource)" method to PseudoServer, and make
ReceivedHttpMessage "getHeader(String)" and "getBody()"
methods public.

"setResource" method simplifies responses that return
status code other then 200 (no need to make anonymous
PseudoServlet class).

Making getHeader(String) and getBody() public allows
greater control over request handled by PseudoServlets
(e.g. it's possible to check assertions on headers or
request body).

I attached patch file that applies those features to
HttpUnit version 1.6.2.

Discussion

  • Tomasz Skutnik

    Tomasz Skutnik - 2006-10-11

    Patch that applies proposed features to httpunit 1.6.2

     
  • Wolfgang Fahl

    Wolfgang Fahl - 2008-03-31

    Logged In: YES
    user_id=1220573
    Originator: NO

    Dear httpunit user!

    Thank you for your feature request. We appreciate the time and effort you are putting into this.

    Please supply a testcase with the expected result for the feature you are asking for and we'll look into implementing it. For a start you might want to get the trunk version from the
    subversion repository (see https://sourceforge.net/svn/?group_id=6550\)
    and have a look at the source code of some of the more than 700 JUnit based testcase in there.

    When you are ready you might want to attach the testcase (and if you already have started implementing it also the actual code) to your feature request.

    This should give you a clue on what a proper testcase for httpunit looks like. The main communication about further details of the development is via the httpunit developer mailinglist. You are most welcome to sign up via
    https://lists.sourceforge.net/lists/listinfo/httpunit-develop

    Yours
    The httpunit developer team

    (Russell and Wolfgang as of 2008-03)

     
  • Wolfgang Fahl

    Wolfgang Fahl - 2008-03-31

    Logged In: YES
    user_id=1220573
    Originator: NO

    I'll happily commit these changes to the subversion repository if you supply a small testcase for the feature.

     
  • Wolfgang Fahl

    Wolfgang Fahl - 2008-03-31
    • assigned_to: nobody --> wolfgang_fahl
    • status: open --> pending
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending --> closed
     

Log in to post a comment.