This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of React Cookbook: Recipes for Mastering the React Framework and have David Griffiths & Dawn Griffiths on-line!
See this thread for details.
Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Problem with Ant using JUnit

 
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello there,

I usually just run my JUnit 3.8.1 unit tests straight from Eclipse.

Figured that it would be a good practice to run my unit tests from Ant (that way other developers wouldn't have to depend on Eclipse)...

Here's what I did so far:



Now, when I tried to run this target, this is the error I got back:



What could I be possibly be doing wrong?

Sincerely,
 
Bartender
Posts: 2658
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You did not tell us your Ant version, but if its 1.6.x,
you can drop your junit jar in ant/lib folder, or add it to Ant's classpath.

In Ant 1.7 you can add junit.jar to the task's classpath.

Regards, Jan
 
Unnsse Khan
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Jan,

The version of Ant I use is the 1.6.5, which comes bundled with Eclipse 3.2

When I checked out Preferences -> Ant -> Runtime, there was a ant-junit.jar file inside the library...

Obviously, this is not the same as junit.jar?

Thanks for the response!

Kindest regards,
 
Jan Cumps
Bartender
Posts: 2658
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ant-junit is the integration library that holds the classes used to integrate junit in ant.

But you still need junit.jar. It's documented on the JUnit task's library dependencies.

Regards, Jan
 
brevity is the soul of wit - shakepeare. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic