struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anuradha S.Athreya" <anuradh...@world2web.com>
Subject RE: StrutsTestCases
Date Mon, 24 Apr 2006 13:02:46 GMT
U need to set the contect path of ur application:
setContextDirectory(new File(Your_Application_ContextPath)); 

-----Original Message-----
From: Phil Zoio [mailto:philzoio@realsolve.co.uk] 
Sent: Monday, April 24, 2006 3:39 PM
To: Struts Users Mailing List
Subject: Re: StrutsTestCases

You should be able to solve the problem by adding the WEB-INF directory onto
your classpath. I couldn't get it to work otherwise

Chaitanya Parkhi wrote:

>hi guys i hav created a java file by using MockObjectStrutsTestCases 
>which tests for a simple login form which takes Login Name & password 
>as a input.in this file i hav following method
>
>public void testSuccessfulLogin() {
>
>        setConfigFile("/WEB-INF/struts-config.xml");
>
>        setRequestPathInfo("/login");
>        addRequestParameter("username","cdp");
>        addRequestParameter("password","cdp@7");
>
>        actionPerform();
>
>        String[] actionErrors = {"username.required","password.required"};
>        verifyActionErrors(actionErrors); }
>
>if i run the above test junit window shows that ther  r no errors,but 
>shows a warning that WB-INF\web.xml not found  does any1 knows why?
>
>  
>
>-----------------------------------------------------------------------
>-
>
>No virus found in this incoming message.
>Checked by AVG Free Edition.
>Version: 7.1.385 / Virus Database: 268.4.5/322 - Release Date: 
>22/04/2006
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message