This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant: runnig unit tests from a JAR?

 
Val Tkov
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to run JUnit tests from a JAR file?

This task does not work:

<junit fork="yes" printsummary="on" haltonfailure="yes" failureproperty="tests.failed">
<formatter type="plain" usefile="true" />
<batchtest todir="${test.reports}">
<fileset dir="dist">
<include name="**/Test*.class" />
</fileset>
</batchtest>
</junit>

The my.jar file is in the \dist directiry.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The junit task certainly can run tests from a jar file. I don't know an easy way to select the tests from a jar via batchtest, though, sorry.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic