jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Lepekhine" <pa...@mail.ru>
Subject Re: AW: AW: Where to find org.apache.cactus.unit.TestAll ?
Date Fri, 16 Aug 2002 10:55:45 GMT
Well, that was right.
Now let it find TestSampleServlet class.
Classpath in <junit> is CLIENT classpath and
it seems to be right.
So, you should improve server classpath.
Server classpath includes WEB-INF/classes and all jars
in WEB-INF/lib by default. 
If you put your TestSampleServlet in one of that rigth place,
include it in war file and deploy it to app-server,
everything should work.
If it works for me, why it will not work for you?
As cactus doc says, test cases must be on the server along
with the client (see Config Howto).
Alexander

-----Original Message-----
From: "Markus Joschko" <jocsch@phreaker.net>
To: "Cactus Users List" <cactus-user@jakarta.apache.org>
Date: Fri, 16 Aug 2002 12:29:58 +0200
Subject: AW: AW: Where to find org.apache.cactus.unit.TestAll ?

> 
> Hi Alexander,
> I forgot to mention that I tried this already. Nothing changes but the error
> message:
> 
>     [junit] TestSampleServlet
>     [junit] java.lang.ClassNotFoundException: TestSampleServlet
> 
> Seems like my classpath is corrupted or? Is there a possibility to have a
> look at the classpath the task uses?
> 
> 
> -----Ursprungliche Nachricht-----
> Von: Alexander Lepekhine [mailto:papun@mail.ru]
> Gesendet: Freitag, 16. August 2002 12:16
> An: Cactus Users List
> Betreff: Re: AW: Where to find org.apache.cactus.unit.TestAll ?
> 
> 
> As you see it can't find TestSampleServlet.TestAll
>  and not a TestSampleServlet. So you should write a class in <junit>
> <test> tag, not a method. Your text must be:
> >          <test name="TestSampleServlet"/>
> >     </junit>
> Class TestSampleServlet should contain a test cases (suite), all of them
> will
> be done.
> Alexander
> 
> -----Original Message-----
> From: "Markus Joschko" <jocsch@phreaker.net>
> To: "Cactus Users List" <cactus-user@jakarta.apache.org>
> Date: Fri, 16 Aug 2002 11:37:27 +0200
> Subject: AW: Where to find org.apache.cactus.unit.TestAll ?
> 
> >
> > Hi,
> > still trying to get a test to work. Here is my corrected ant task and the
> > output. Why can't it find the TestSampleServlet class? It's the one to be
> > downloaded in "quickstart". And I'm 100% sure it's under the given
> > pathelement location name.
> >
> >    <junit printsummary="yes" haltonfailure="yes" haltonerror="yes"
> > fork="yes">
> >        <classpath>
> >             <pathelement
> >
> location="/home/markus/downloads/jakarta-cactus-13-1.4b1/test/cactus.propert
> > ies"/>
> >
> >  --here-->  <pathelement
> >
> location="/home/markus/downloads/jakarta-cactus-13-1.4b1/test/WEB-INF/classe
> > s/TestSampleServlet.class"/>
> >
> > 		<fileset
> > dir="/home/markus/downloads/jakarta-cactus-13-1.4b1/test/WEB-INF/classes">
> > 			<include name="**/*.class"/>
> > 		</fileset>
> >
> > 		<path refid="project.class.path"/>
> >          </classpath>
> >
> >          <formatter type="plain" usefile="false"/>
> >
> >          <test name="TestSampleServlet.TestAll"/>
> >     </junit>
> >
> > Output is:
> >
> > test:
> >     [junit] Running TestSampleServlet.TestAll
> >     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
> >     [junit] Testsuite: TestSampleServlet.TestAll
> >     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
> >     [junit]
> >     [junit]     Caused an ERROR
> >     [junit] TestSampleServlet.TestAll
> >     [junit] java.lang.ClassNotFoundException: TestSampleServlet.TestAll
> >     [junit]     at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
> >     [junit]     at java.security.AccessController.doPrivileged(Native
> > Method)
> >     [junit]     at
> > java.net.URLClassLoader.findClass(URLClassLoader.java:186)
> >     [junit]     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> >     [junit]     at
> > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
> >     [junit]     at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
> >     [junit]     at
> > java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
> >     [junit]     at java.lang.Class.forName0(Native Method)
> >     [junit]     at java.lang.Class.forName(Class.java:130)
> >     [junit]     at
> >
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.<init>(JUnitTes
> > tRunner.java:171)
> >     [junit]     at
> >
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.<init>(JUnitTes
> > tRunner.java:156)
> >     [junit]     at
> >
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestR
> > unner.java:407)
> >
> > Why?
> >  Thx,
> >   MArkus
> >
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:cactus-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:cactus-user-help@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message