Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

What causes this error in the Junit test?

 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All!
I first created a directory as StudentInfo and went inside it, then I created the class



I issued the command


--
The StudentTest class was successfully compiled and the StudentTest.class was created.
Then to run the StudentTest class I issued the command


which resulted in the error message



Please direct me to overcome this error

Varuna
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Varuna Seneviratna:
Hi All!
I first created a directory as StudentInfo and went inside it, then I created the class



I issued the command


--
The StudentTest class was successfully compiled and the StudentTest.class was created.
Then to run the StudentTest class I issued the command


which resulted in the error message



Please direct me to overcome this error

Varuna



Hello,

The error seems that it is not able to find Class file
it can be like, you might be using Package
and while triggering run for "StudentTest" you missed to mention the package name, instead you mentioned only class name.

Is it so ???
 
Varuna Seneviratna
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No I am not using any package statements
 
Varuna Seneviratna
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The above problem was caused because:-
In Junit 4.5, There is no package starting with junit.All the packages start with org.There is no TestCase or TestRunner class.According to the Junit 4.5 javadoc.


Varuna
 
author & internet detective
Posts: 40213
816
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since this is about JUnit, I'm moving it to our testing forum.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since JUnit 4, the AWT-TestRunner has been removed from the distribution.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic