• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

call a JUnit test from another class ?

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ram,
Where is JUnit.jar? In the ear? war? somewhere else?
 
David Coulthard
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 !
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic