You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by bu...@apache.org on 2004/02/25 16:46:29 UTC

DO NOT REPLY [Bug 27225] New: - Additional class level method for ServletTestCase

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27225>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27225

Additional class level method for ServletTestCase

           Summary: Additional class level method for ServletTestCase
           Product: Cactus
           Version: Nightly Build
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Framework
        AssignedTo: cactus-dev@jakarta.apache.org
        ReportedBy: trajano@yahoo.com


I liked the in container testing provided by Cactus with auto deployment, but 
I would also like to use HTTPUnit with it and provide a generic way of going 
into the deployed application.

The hardest part to doing this I think is getting the URL to connect to.  I 
suggest adding something like this method or a variable like contextRoot to 
the class.

    protected String requestUrl(String relativeUrl) {
        StringBuffer url = request.getRequestURL();
        url.delete(url.lastIndexOf("/"), url.length());
        url.append(relativeUrl);
        return url.toString();
    }

---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org