Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Testing
Search Coderanch
Advance search
Google search
Register / Login
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
Tim Cooke
Ron McLeod
paul wheaton
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Himai Minh
Bartenders:
Forum:
Testing
Using junit with ant
Abhi Yadav
Greenhorn
Posts: 6
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all
i m getting this output while trying to run
junit
from
ant
script
C:\jakarta-ant-1.5.1\bin>ant -f C:\eclipse\workspace\junitTests\build.xml Buildfile: C:\eclipse\workspace\junitTests\build.xml compile-test: [echo] Inside compile-test [echo] C:\eclipse\workspace\junitTests\test [javac] Compiling 2 source files [javac] [parsing started C:\eclipse\workspace\junitTests\test\EncounterEvent TrackerBOTest.java] [javac] [parsing completed 160ms] [javac] [parsing started] C:\eclipse\workspace\junitTests\test\SimpleTest.java [javac] [parsing completed 20ms] [javac] [loading C:\j2sdk1.4.2_01\jre\lib\rt.jar(java/util/TimeZone.class)] [javac] [checking test.EncounterEventTrackerBOTest] [javac] [wrote] C:\eclipse\workspace\junitTests\test\EncounterEventTrackerBOTest.class [javac] [checking test.SimpleTest] [javac] [wrote C:\eclipse\workspace\junitTests\test\SimpleTest.class] [javac] [total 30033ms] test: [echo] ::Inside test [junit] Testsuite: test.SimpleTest [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec [junit] Null Test: Caused an ERROR [junit] test.SimpleTest [junit] java.lang.ClassNotFoundException: test.SimpleTest [junit] at java.net.URLClassLoader$1.run(URLClassLoader.java:199) [junit] at java.security.AccessController.doPrivileged(Native Method) [junit] at java.net.URLClassLoader.findClass(URLClassLoader.java:187) [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:289) [junit] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:235) [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:235) [junit] TEST test.SimpleTest FAILED [junit] Testsuite: test.EncounterEventTrackerBOTest [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec [junit] Null Test: Caused an ERROR [junit] test.EncounterEventTrackerBOTest [junit] java.lang.ClassNotFoundException: test.EncounterEventTrackerBOTest [junit] at java.net.URLClassLoader$1.run(URLClassLoader.java:199) [junit] at java.security.AccessController.doPrivileged(Native Method) [junit] at java.net.URLClassLoader.findClass(URLClassLoader.java:187) [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:289) [junit] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:235) [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:235) [junit] TEST test.EncounterEventTrackerBOTest FAILED all: BUILD SUCCESSFUL Total time: 32 seconds
Although it is generating the
Test
files by javac yet itself is unable to find them.
anybody out there to tell me what is wrong??
Lasse Koskela
author
Posts: 11962
5
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Could you post your 'test' target in full so we could see how you're setting the paths etc. for <junit/>?
Author of
Test Driven
(2007) and
Effective Unit Testing
(2013) [
Blog
] [
HowToAskQuestionsOnJavaRanch
]
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
maven and Junit Tests
eclipse and and junit
help with marcus questions
'junit' task problem
Error using CMD
More...