| Author |
call a JUnit test from another class ?
|
David Coulthard
Greenhorn
Joined: Apr 16, 2008
Posts: 16
|
|
I'm using Rad 6. I have test cases written for some of the programs in the test package. I want to write a java program in some other package to trigger the JUnit test. Is it possible ? (what im trying is to have a jsp page that can select the exact test to run from a drop down, pass it to a java class in another package, and this java class has to trigger that exact JUnit test) I tried it and am getting the following error. Error 500: Error while defining class: com.macys.ps.parms.comm.test.allMessagesTest This error indicates that the class: junit.framework.TestCase could not be located while defining the class: com.macys.ps.parms.comm.test.allMessagesTest This is often caused by having the class at a higher point in the classloader hierarchy Dumping the current context classloader hierarchy: ==> indicates defining classloader *** indicates classloader where the missing class could have been found ==>[0] com.ibm.ws.classloader.CompoundClassLoader@4a9e9ce7
|
 |
David Coulthard
Greenhorn
Joined: Apr 16, 2008
Posts: 16
|
|
|
I hope i have posted it in the right place .. Im new here and I dont know where to post for JUnit related questions. thanks.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26499
|
|
Ram, Where is JUnit.jar? In the ear? war? somewhere else?
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
David Coulthard
Greenhorn
Joined: Apr 16, 2008
Posts: 16
|
|
|
got it figured out .... I had added JUnit to my project classpath but apparently that was not enough.... silly me ! I copied the jar file and placed it in my library and it works now !
|
 |
 |
|
|
subject: call a JUnit test from another class ?
|
|
|