Re: Cactus test case

2008-02-07 Thread Petar Tahchiev
Hi Raghunandan ,

The Cactus project has a really good documentation. One point to start is
the sample projects. Have a look at the sample projects, that come with the
distribution, and once you run these sample projects, try to look in them
what part of the HTTP
layer is tested with Cactus - cookies, request/session attributes,
parameters, etc.
Then try to test those things in your servlet.
Some links to the Cactus documentation:

http://jakarta.apache.org/cactus/writing/howto_testcase_servlet.html
http://jakarta.apache.org/cactus/integration/index.html

Cheers, Petar.

2008/2/7, Raghunandan B [EMAIL PROTECTED]:

 Hi,
 How do i write cactus test case to test this servlet


 import java.io.*;

 import javax.servlet.http.*;
 import javax.servlet.*;
 import java.net.*;
 import java.util.*;



 public class SampleServlet extends HttpServlet
 {

 public void doGet(HttpServletRequest request,
 HttpServletResponse response)
   throws ServletException, IOException {
 response.setContentType(text/html);
 PrintWriter out = response.getWriter();
 String title = Session Tracking Example;
 HttpSession session = request.getSession(true);
 String heading;
 Integer accessCount =
   (Integer)session.getAttribute(accessCount);
 if (accessCount == null) {
 accessCount = new Integer(0);
   } else {

 accessCount = new Integer(accessCount.intValue() + 1);
   }

 // Use setAttribute instead of putValue in version 2.2.
 session.setAttribute(accessCount, accessCount);

 out.println(
 BODY\n+  p align=center+
 Session ID +

  session.getId() + br
 +
   Creation Time\n +

 new Date(session.getCreationTime()) + \n + br
 +

   Time of Last Access\n +

 new Date(session.getLastAccessedTime()) + \n +br
 +

   Number of Previous Accesses\n +
  accessCount + \n + /p+

 /BODY/HTML);

   }

   /** Handle GET and POST requests identically. */

   public void doPost(HttpServletRequest request,
  HttpServletResponse response)
   throws ServletException, IOException {
 doGet(request, response);
   }
 }



 Regards,

 Raghu




-- 
Regards, Petar!
Karlovo, Bulgaria.

EOOXML Objections
http://www.grokdoc.net/index.php/EOOXML_objections

Public PGP Key at:
https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611


Re: Cactus test case

2008-02-07 Thread jeya seelan
Hi 
Raghunandan 
,

if you go through this site you will get answer for your question.

http://www.onjava.com/pub/a/onjava/2004/09/22/test-struts.html
 
Regards,

Jeyaseelan.A
Anadocs IT Solutions Pvt,
Adyar, Chennai-20,
Cell - 9962290394.


- Original Message 
From: Raghunandan B [EMAIL PROTECTED]
To: cactus-user@jakarta.apache.org
Sent: Thursday, 7 February, 2008 12:54:05 AM
Subject: Re:Cactus test case

Hi,
How 
do 
i 
write 
cactus 
test 
case 
to 
test 
this 
servlet


import 
java.io.*;

import 
javax.servlet.http.*;
import 
javax.servlet.*;
import 
java.net.*;
import 
java.util.*;



public 
class 
SampleServlet 
extends 
HttpServlet
{

 
public 
void 
doGet(HttpServletRequest 
request,
  
  
  
  
  
  
  
  
  
  
HttpServletResponse 
response)
  
  
  
throws 
ServletException, 
IOException 
{
  
  
response.setContentType(text/html);
  
  
PrintWriter 
out 
= 
response.getWriter();
  
  
String 
title 
= 
Session 
Tracking 
Example;
  
  
HttpSession 
session 
= 
request.getSession(true);
  
  
String 
heading;
  
  
Integer 
accessCount 
=
  
  
  
(Integer)session.getAttribute(accessCount);
  
  
if 
(accessCount 
== 
null) 
{
  
  
  
  
accessCount 
= 
new 
Integer(0);
  
  
  
  
  
  
  
} 
else 
{

  
  
  
  
accessCount 
= 
new 
Integer(accessCount.intValue() 
+ 
1);
  
  
  
}

  
  
// 
Use 
setAttribute 
instead 
of 
putValue 
in 
version 
2.2.
  
  
session.setAttribute(accessCount, 
accessCount);

  
  
out.println(
  
  
  
  
  
  
  
  
BODY\n+ 
 
p 
align=center+
  
  
  
  
Session 
ID 
+

  
  
  
  
  
  
  
  
 
session.getId() 
+ 
br
  
  
  
  
  
  
  
  
+
  
  
  
  
  
  
  
  
  
Creation 
Time\n 
+

  
  
  
  
  
  
  
  
new 
Date(session.getCreationTime()) 
+ 
\n 
+ 
br
  
  
  
  
  
  
  
  
+

  
  
  
  
  
  
  
  
  
Time 
of 
Last 
Access\n 
+

  
  
  
  
  
  
  
  
new 
Date(session.getLastAccessedTime()) 
+ 
\n 
+br
  
  
  
  
  
  
  
  
+

  
  
  
  
  
  
  
  
  
Number 
of 
Previous 
Accesses\n 
+
  
  
  
  
  
  
  
  
 
accessCount 
+ 
\n 
+ 
/p+

  
  
  
  
  
  
  
  
/BODY/HTML);

  
}

  
/** 
Handle 
GET 
and 
POST 
requests 
identically. 
*/

  
public 
void 
doPost(HttpServletRequest 
request,
  
  
  
  
  
  
  
  
  
  
 
HttpServletResponse 
response)
  
  
  
throws 
ServletException, 
IOException 
{
  
  
doGet(request, 
response);
  
}
}



Regards,

Raghu





Re: Cactus test case problem

2003-02-01 Thread Martin
Hello Vincent-
Is this anomaly specific to Swing
What about AWT Could we use commons-logging with AWT 
or should AWT implementations exclude commons-logging as with Swing?
Many Thanks,
-Martin

- Original Message - 
From: Vincent Massol [EMAIL PROTECTED]
To: 'Cactus Users List' [EMAIL PROTECTED]
Cc: 'Martin' [EMAIL PROTECTED]
Sent: Saturday, February 01, 2003 4:48 AM
Subject: RE: Cactus test case problem


 Hi Martin,
 
 I think I know what the error is (see
 http://jakarta.apache.org/cactus/faq.html#faq8). It has to do with the
 fact that Kumar is using the Swing Test Runner and this later is using a
 reloadable class runner that has classloading issues with
 commons-logging. Thus commons-logging needs to be excluded from that
 loader.
 
 Thanks for your help!
 -Vincent
 
  -Original Message-
  From: Martin [mailto:[EMAIL PROTECTED]]
  Sent: 02 September 2002 03:26
  To: Cactus Users List
  Cc: [EMAIL PROTECTED]
  Subject: Re: Cactus test case problem
  
  Kumar-
  Can we see the code for class SophiewebServlet()
  Something in the constructor is causing your new SophiewebServlet
  constructor to fail and return a null
  -Martin
  
  - Original Message -
  From: Vincent Massol [EMAIL PROTECTED]
  To: 'Cactus Users List' [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Friday, January 31, 2003 4:20 PM
  Subject: RE: Cactus test case problem
  
  
   Hi Kumar,
  
   See the Cactus FAQ:
  
   http://jakarta.apache.org/cactus/faq.html#faq8
  
   -Vincent
  
-Original Message-
From: Kumar, Kiran (MED, TCS) [mailto:[EMAIL PROTECTED]]
Sent: 29 January 2003 04:21
To: 'Cactus Users List'
Subject: Cactus test case problem
   
Hi
 I am new to JUnit frame work as such and cactus in particular. I
 have
installed cactus and set all the class paths correctly.
But when i run the test class for my servlet it threw me this
   exception.
Can somebody help me out in finding the exact root cause of the
   problem.
   
   
junit.framework.AssertionFailedError: Exception in constructor:
testDefaultConstructor
(org.apache.commons.logging.LogConfigurationException:
java.lang.ClassCastException:
org.apache.commons.logging.impl.LogFactoryImpl
 at
   
 org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:506)
 at
   
 org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:350)
 at
 org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381)
 at
   
  
 org.apache.cactus.util.JUnitVersionHelper.around146_getTestCaseName(JUni
   
 tVersionHelper.java;org/apache/cactus/util/log/LogAspect.aj(1k):1170)
   



Cactus test case problem,
Kumar, Kiran (MED, TCS)

 
Re: Cactus test case problem,
Martin

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol







 












 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  [EMAIL PROTECTED]">
  Reply via email to
  
  













Cactus test case problem,
Kumar, Kiran (MED, TCS)

 
Re: Cactus test case problem,
Martin

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol







 












 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  [EMAIL PROTECTED]">
  Reply via email to
  
  













Cactus test case problem,
Kumar, Kiran (MED, TCS)

 
Re: Cactus test case problem,
Martin

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol







 












 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  [EMAIL PROTECTED]">
  Reply via email to
  
  













Cactus test case problem,
Kumar, Kiran (MED, TCS)

 
Re: Cactus test case problem,
Martin

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol







 












 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  [EMAIL PROTECTED]">
  Reply via email to
  
  













Cactus test case problem,
Kumar, Kiran (MED, TCS)

 
Re: Cactus test case problem,
Martin

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol







 












 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  [EMAIL PROTECTED]">
  Reply via email to
  
  













Cactus test case problem,
Kumar, Kiran (MED, TCS)

 
Re: Cactus test case problem,
Martin

Re: Cactus test case problem,
Martin

RE: 

RE: Cactus test case problem

2003-02-01 Thread Vincent Massol
Hi Martin,

Please have a look at the FAQ entry:
http://junit.sourceforge.net/doc/faq/faq.htm#running_8

To answer your question:
- it is not an anomaly of JUnit. It is by design :-)
- you can use commons-logging with any JUnit Test Runner (simply put it
in the excluded list)
- I believe it is the same with the AWT Runner as the JUnit FAQ says
GUI Runners. If you want to be sure, you'll need to check the
sources... ;-)

-Vincent

 -Original Message-
 From: Martin [mailto:[EMAIL PROTECTED]]
 Sent: 02 September 2002 15:41
 To: Cactus Users List
 Subject: Re: Cactus test case problem
 
 Hello Vincent-
 Is this anomaly specific to Swing
 What about AWT Could we use commons-logging with AWT
 or should AWT implementations exclude commons-logging as with Swing?
 Many Thanks,
 -Martin
 
 - Original Message -
 From: Vincent Massol [EMAIL PROTECTED]
 To: 'Cactus Users List' [EMAIL PROTECTED]
 Cc: 'Martin' [EMAIL PROTECTED]
 Sent: Saturday, February 01, 2003 4:48 AM
 Subject: RE: Cactus test case problem
 
 
  Hi Martin,
 
  I think I know what the error is (see
  http://jakarta.apache.org/cactus/faq.html#faq8). It has to do with
the
  fact that Kumar is using the Swing Test Runner and this later is
using a
  reloadable class runner that has classloading issues with
  commons-logging. Thus commons-logging needs to be excluded from that
  loader.
 
  Thanks for your help!
  -Vincent
 
   -Original Message-
   From: Martin [mailto:[EMAIL PROTECTED]]
   Sent: 02 September 2002 03:26
   To: Cactus Users List
   Cc: [EMAIL PROTECTED]
   Subject: Re: Cactus test case problem
  
   Kumar-
   Can we see the code for class SophiewebServlet()
   Something in the constructor is causing your new SophiewebServlet
   constructor to fail and return a null
   -Martin
  
   - Original Message -
   From: Vincent Massol [EMAIL PROTECTED]
   To: 'Cactus Users List' [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Sent: Friday, January 31, 2003 4:20 PM
   Subject: RE: Cactus test case problem
  
  
Hi Kumar,
   
See the Cactus FAQ:
   
http://jakarta.apache.org/cactus/faq.html#faq8
   
-Vincent
   
 -Original Message-
 From: Kumar, Kiran (MED, TCS) [mailto:[EMAIL PROTECTED]]
 Sent: 29 January 2003 04:21
 To: 'Cactus Users List'
 Subject: Cactus test case problem

 Hi
  I am new to JUnit frame work as such and cactus in
particular. I
  have
 installed cactus and set all the class paths correctly.
 But when i run the test class for my servlet it threw me this
exception.
 Can somebody help me out in finding the exact root cause of
the
problem.


 junit.framework.AssertionFailedError: Exception in
constructor:
 testDefaultConstructor
 (org.apache.commons.logging.LogConfigurationException:
 java.lang.ClassCastException:
 org.apache.commons.logging.impl.LogFactoryImpl
  at

 
org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:506)
  at

 
org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:350)
  at
  org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381)
  at

   
 
org.apache.cactus.util.JUnitVersionHelper.around146_getTestCaseName(JUni

 
tVersionHelper.java;org/apache/cactus/util/log/LogAspect.aj(1k):1170)
  at

   
 
org.apache.cactus.util.JUnitVersionHelper.getTestCaseName(JUnitVersionHe
 lper.java;org/apache/cactus/util/log/LogAspect.aj(1k):103)
  at
   
org.apache.cactus.AbstractTestCase.init(AbstractTestCase.java:124)
  at

   
 
org.apache.cactus.AbstractWebTestCase.init(AbstractWebTestCase.java:86
 )
  at
  org.apache.cactus.ServletTestCase.init(ServletTestCase.java:119)
  at

   
 
com.ge.sophieweb.controler.test.TestSophiewebServlet.init(TestSophiewe
 bServlet.java:26)
  at java.lang.reflect.Constructor.newInstance(Native Method)
  at
&










RE: A question







cactus-user









 

 
--  
Chronological
--
  

 






Find

 

 
  --  
  Thread
  --  
  






RE: A question


From: Vincent Massol
Subject: RE: A question
Date: Fri, 31 Jan 2003 12:21:06 -0800






		
			RE: Cactus test case problem
			Vincent Massol
			Sat, 01 Feb 2003 13:27:56 -0800
		







Hi Tony,

You should have a look at the following FAQ entry:
http://jakarta.apache.org/cactus/faq.html#faq4

Cactus is about unit testing and there is no order of execution of the
JUnit testXXX() methods (same principle as JUnit). You shouldn't rely on
a first call setting up some state. Consequently, Cactus starts a new
Session for each test.

If you need to set up some object in the session, you can do it either
in the setUp() method or at the beginning of your testXXX() method.

Note that in Cactus 1.5, I have added a new API called
WebRequest.getSessionCookie() which allows you to get a cookie before
the test begins as shown below. But this is only to sup

RE: Cactus test case problem

2003-02-01 Thread Vincent Massol
Hi Martin,

I think I know what the error is (see
http://jakarta.apache.org/cactus/faq.html#faq8). It has to do with the
fact that Kumar is using the Swing Test Runner and this later is using a
reloadable class runner that has classloading issues with
commons-logging. Thus commons-logging needs to be excluded from that
loader.

Thanks for your help!
-Vincent

 -Original Message-
 From: Martin [mailto:[EMAIL PROTECTED]]
 Sent: 02 September 2002 03:26
 To: Cactus Users List
 Cc: [EMAIL PROTECTED]
 Subject: Re: Cactus test case problem
 
 Kumar-
 Can we see the code for class SophiewebServlet()
 Something in the constructor is causing your new SophiewebServlet
 constructor to fail and return a null
 -Martin
 
 - Original Message -
 From: Vincent Massol [EMAIL PROTECTED]
 To: 'Cactus Users List' [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Friday, January 31, 2003 4:20 PM
 Subject: RE: Cactus test case problem
 
 
  Hi Kumar,
 
  See the Cactus FAQ:
 
  http://jakarta.apache.org/cactus/faq.html#faq8
 
  -Vincent
 
   -Original Message-
   From: Kumar, Kiran (MED, TCS) [mailto:[EMAIL PROTECTED]]
   Sent: 29 January 2003 04:21
   To: 'Cactus Users List'
   Subject: Cactus test case problem
  
   Hi
I am new to JUnit frame work as such and cactus in particular. I
have
   installed cactus and set all the class paths correctly.
   But when i run the test class for my servlet it threw me this
  exception.
   Can somebody help me out in finding the exact root cause of the
  problem.
  
  
   junit.framework.AssertionFailedError: Exception in constructor:
   testDefaultConstructor
   (org.apache.commons.logging.LogConfigurationException:
   java.lang.ClassCastException:
   org.apache.commons.logging.impl.LogFactoryImpl
at
  
org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:506)
at
  
org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:350)
at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381)
at
  
 
org.apache.cactus.util.JUnitVersionHelper.around146_getTestCaseName(JUni
  
tVersionHelper.java;org/apache/cactus/util/log/LogAspect.aj(1k):1170)
at
  
 
org.apache.cactus.util.JUnitVersionHelper.getTestCaseName(JUnitVersionHe
   lper.java;org/apache/cactus/util/log/LogAspect.aj(1k):103)
at
  org.apache.cactus.AbstractTestCase.init(AbstractTestCase.java:124)
at
  
 
org.apache.cactus.AbstractWebTestCase.init(AbstractWebTestCase.java:86
   )
at
org.apache.cactus.ServletTestCase.init(ServletTestCase.java:119)
at
  
 
com.ge.sophieweb.controler.test.TestSophiewebServlet.init(TestSophiewe
   bServlet.java:26)
at java.lang.reflect.Constructor.newInstance(Native Method)
at
  
 
com.ge.sophieweb.controler.test.TestSophiewebServlet.suite(TestSophieweb
   Servlet.java:39)
at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:53)
at
  
 
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
at
  
 
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractB
   utton.java:1504)
at
  
 
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.ja
   va:378)
at
  
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
at
  
 
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonList
   ener.java:216)
at java.awt.Component.processMouseEvent(Component.java:3715)
at java.awt.Component.processEvent(Component.java:3544)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2593)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2497)
at
  
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at
  
java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:926)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
at
  
 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThrea
   d.java:131)
at
  
 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.
   java:98)
at
  java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
   )
  
  
   this is the line of code which actually failed...
   public void testDefaultConstructor()
 { assertNotNull(new SophiewebServlet()); }
  
  
  
   Thanks and Regards
   Kiran Kumar
  
  
   -Original Message-
   From: Vincent Massol [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, January 28, 2003 7:17 PM
   To: 'Cactus Users List'
   Subject: RE: getRequestDispatcher()/JSP Test problem - more...
  
  
  
   Hi Franck

Re: Cactus test case problem

2003-01-31 Thread Martin
Kumar-
Can we see the code for class SophiewebServlet()
Something in the constructor is causing your new SophiewebServlet
constructor to fail and return a null
-Martin

- Original Message -
From: Vincent Massol [EMAIL PROTECTED]
To: 'Cactus Users List' [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, January 31, 2003 4:20 PM
Subject: RE: Cactus test case problem


 Hi Kumar,

 See the Cactus FAQ:

 http://jakarta.apache.org/cactus/faq.html#faq8

 -Vincent

  -Original Message-
  From: Kumar, Kiran (MED, TCS) [mailto:[EMAIL PROTECTED]]
  Sent: 29 January 2003 04:21
  To: 'Cactus Users List'
  Subject: Cactus test case problem
 
  Hi
   I am new to JUnit frame work as such and cactus in particular. I have
  installed cactus and set all the class paths correctly.
  But when i run the test class for my servlet it threw me this
 exception.
  Can somebody help me out in finding the exact root cause of the
 problem.
 
 
  junit.framework.AssertionFailedError: Exception in constructor:
  testDefaultConstructor
  (org.apache.commons.logging.LogConfigurationException:
  java.lang.ClassCastException:
  org.apache.commons.logging.impl.LogFactoryImpl
   at
  org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:506)
   at
  org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:350)
   at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381)
   at
 
 org.apache.cactus.util.JUnitVersionHelper.around146_getTestCaseName(JUni
  tVersionHelper.java;org/apache/cactus/util/log/LogAspect.aj(1k):1170)
   at
 
 org.apache.cactus.util.JUnitVersionHelper.getTestCaseName(JUnitVersionHe
  lper.java;org/apache/cactus/util/log/LogAspect.aj(1k):103)
   at
 org.apache.cactus.AbstractTestCase.init(AbstractTestCase.java:124)
   at
 
 org.apache.cactus.AbstractWebTestCase.init(AbstractWebTestCase.java:86
  )
   at org.apache.cactus.ServletTestCase.init(ServletTestCase.java:119)
   at
 
 com.ge.sophieweb.controler.test.TestSophiewebServlet.init(TestSophiewe
  bServlet.java:26)
   at java.lang.reflect.Constructor.newInstance(Native Method)
   at
 
 com.ge.sophieweb.controler.test.TestSophiewebServlet.suite(TestSophieweb
  Servlet.java:39)
   at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:53)
   at
 
 javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
   at
 
 javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractB
  utton.java:1504)
   at
 
 javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.ja
  va:378)
   at
  javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
   at
 
 javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonList
  ener.java:216)
   at java.awt.Component.processMouseEvent(Component.java:3715)
   at java.awt.Component.processEvent(Component.java:3544)
   at java.awt.Container.processEvent(Container.java:1164)
   at java.awt.Component.dispatchEventImpl(Component.java:2593)
   at java.awt.Container.dispatchEventImpl(Container.java:1213)
   at java.awt.Component.dispatchEvent(Component.java:2497)
   at
  java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
   at
  java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
   at java.awt.Container.dispatchEventImpl(Container.java:1200)
   at java.awt.Window.dispatchEventImpl(Window.java:926)
   at java.awt.Component.dispatchEvent(Component.java:2497)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
   at
 
 java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThrea
  d.java:131)
   at
 
 java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.
  java:98)
   at
 java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
  )
 
 
  this is the line of code which actually failed...
  public void testDefaultConstructor()
{ assertNotNull(new SophiewebServlet()); }
 
 
 
  Thanks and Regards
  Kiran Kumar
 
 
  -Original Message-
  From: Vincent Massol [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, January 28, 2003 7:17 PM
  To: 'Cactus Users List'
  Subject: RE: getRequestDispatcher()/JSP Test probl



Cactus test case problem,
Kumar, Kiran (MED, TCS)

 
Re: Cactus test case problem,
Martin

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol







 












 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  
  Reply via email to
  
  













Cactus test case problem,
Kumar, Kiran (MED, TCS)

 
Re: Cactus test case problem,
Martin

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol

Re: Cactus test case problem

2003-01-31 Thread Martin
Kumar-
Can we see the code for class SophiewebServlet()
Something in the constructor is causing your new SophiewebServlet
constructor to fail and return a null
-Martin

- Original Message -
From: Vincent Massol [EMAIL PROTECTED]
To: 'Cactus Users List' [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, January 31, 2003 4:20 PM
Subject: RE: Cactus test case problem


 Hi Kumar,

 See the Cactus FAQ:

 http://jakarta.apache.org/cactus/faq.html#faq8

 -Vincent

  -Original Message-
  From: Kumar, Kiran (MED, TCS) [mailto:[EMAIL PROTECTED]]
  Sent: 29 January 2003 04:21
  To: 'Cactus Users List'
  Subject: Cactus test case problem
 
  Hi
   I am new to JUnit frame work as such and cactus in particular. I have
  installed cactus and set all the class paths correctly.
  But when i run the test class for my servlet it threw me this
 exception.
  Can somebody help me out in finding the exact root cause of the
 problem.
 
 
  junit.framework.AssertionFailedError: Exception in constructor:
  testDefaultConstructor
  (org.apache.commons.logging.LogConfigurationException:
  java.lang.ClassCastException:
  org.apache.commons.logging.impl.LogFactoryImpl
   at
  org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:506)
   at
  org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:350)
   at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381)
   at
 
 org.apache.cactus.util.JUnitVersionHelper.around146_getTestCaseName(JUni
  tVersionHelper.java;org/apache/cactus/util/log/LogAspect.aj(1k):1170)
   at
 
 org.apache.cactus.util.JUnitVersionHelper.getTestCaseName(JUnitVersionHe
  lper.java;org/apache/cactus/util/log/LogAspect.aj(1k):103)
   at
 org.apache.cactus.AbstractTestCase.init(AbstractTestCase.java:124)
   at
 
 org.apache.cactus.AbstractWebTestCase.init(AbstractWebTestCase.java:86
  )
   at org.apache.cactus.ServletTestCase.init(ServletTestCase.java:119)
   at
 
 com.ge.sophieweb.controler.test.TestSophiewebServlet.init(TestSophiewe
  bServlet.java:26)
   at java.lang.reflect.Constructor.newInstance(Native Method)
   at
 
 com.ge.sophieweb.controler.test.TestSophiewebServlet.suite(TestSophieweb
  Servlet.java:39)
   at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:53)
   at
 
 javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
   at
 
 javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractB
  utton.java:1504)
   at
 
 javax.swing.DefaultButtonModel.fireAc



Cactus test case problem,
Kumar, Kiran (MED, TCS)

 
Re: Cactus test case problem,
Martin

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol







 












 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  [EMAIL PROTECTED]">
  Reply via email to
  
  













Cactus test case problem,
Kumar, Kiran (MED, TCS)

 
Re: Cactus test case problem,
Martin

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol







 












 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  [EMAIL PROTECTED]">
  Reply via email to
  
  













Cactus test case problem,
Kumar, Kiran (MED, TCS)

 
Re: Cactus test case problem,
Martin

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol







 












 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  [EMAIL PROTECTED]">
  Reply via email to
  
  













Cactus test case problem,
Kumar, Kiran (MED, TCS)

 
Re: Cactus test case problem,
Martin

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol







 












 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  [EMAIL PROTECTED]">
  Reply via email to
  
  













Cactus test case problem,
Kumar, Kiran (MED, TCS)

 
Re: Cactus test case problem,
Martin

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol







 












 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  [EMAIL PROTECTED]">
  Reply via email to
  
  













Cactus test case problem,
Kumar, Kiran (MED, TCS)

 
Re: Cactus test case problem,
Martin

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol

Re: Cactus test case problem,
Martin

RE: Cactus test case problem,
Vincent Massol