Hi Friends,

While Running Testcase, I am facing following problems,'
          
1)  I had writing testcase for Cactus as bellow  and Run it gives me
an error as,
                       " junit.framework.AssertionFailedError:
Exception in constructor: testStringArrayJSPTest
(java.lang.NoClassDefFoundError:
                        
org/apache/commons/httpclient/HttpMethod"

2) If I add Lib File  commons-httpclient-2.0-rc2.jar in classpath
above error get removed and i got new one as,
                      
"org.apache.cactus.util.ChainedRuntimeException: Missing Cactus
property [cactus.contextURL]" 

If  I use the same compiled class file of code in  classes folder of
WEB-INF and tried to check. it gives Success as a result.
Can you tell me Is there any problem in code..Or class path library
problem?

The Code I started with:

import junit.framework.Test;
import junit.framework.TestSuite;

import org.apache.cactus.JspTestCase;
import org.apache.cactus.WebRequest;
import org.apache.cactus.WebResponse;


public class StringArrayJSPTest extends JspTestCase {

 public void beginStringArrayJSPTest(WebRequest request){
        
  }
  
  public StringArrayJSPTest()
  {
        super();
  }
  
  
  public void testStringArrayJSPTest(){
        
        try{
                  
                  pageContext.include("/StringArrayJSP.jsp");
                  int mVal =
((StringArray)pageContext.getAttribute("stringArray1")).count();

                  System.out.println("This"+mVal);
                  assertEquals("The Function should Add ELement
Properly",3,mVal);
        
        }
        catch(Exception ex)
        {
                System.out.println("Exception: "+ ex.getMessage());
        }
        
  }
  
  public void endStringArrayJSPTest(WebResponse responce){
        
  }
  
  
  public void setUP(){
        System.out.println("Before Test");
        
  }
  
  public void tearDown(){
        System.out.println("After Test");
  }
  
  public static void main(String[] theArgs)
         {
                 junit.awtui.TestRunner.main(new String[]
{StringArrayJSPTest.class.getName()});
         }


  public static Test suite()
        {
                return new TestSuite(StringArrayJSPTest.class);
        }

}


CAn anybody help me..?  
If possible please tell me how we are using client side lib file.
Where we store those?

Thanking You,

Ragards,
Ganesh N.

-- 
India.com free e-mail - www.india.com. 
Check out our value-added Premium features, such as an extra 20MB for mail storage, 
POP3, e-mail forwarding, and ads-free mailboxes!

Powered by Outblaze

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to