File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Testing and the fly likes Ant JUnit Reports. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Ant JUnit Reports." Watch "Ant JUnit Reports." New topic
Author

Ant JUnit Reports.

Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Hello All,

Had one question about ant junit reports. The thing that i am running a test suite to run.... lets say, 10 test cases and lets say the 6th test case fails and does not run the other 4 test cases. In the report i see all the 10 test cases mentioned. Is there a way to remove the 4 test cases from the report, because the test cases were not run anyways?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29220
    
135

Somnath Mallick wrote:Had one question about ant junit reports. The thing that i am running a test suite to run.... lets say, 10 test cases and lets say the 6th test case fails and does not run the other 4 test cases.

Something sounds wrong. JUnit doesn't let you skip running tests if earlier ones fail as far as I know. (TestNG does.) How are you skipping the later test cases.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
I created a custom runner to skip test cases. I was looking for some information on how to skip JUnit test cases, and came across custom runners, so i coded myself one by looking at online guides.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29220
    
135

Ah. So your custom runner isn't integrating with Ant the way you like. That's not a standard scenario. You are going to need to read the Ant source code to see where they get the count from.
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Noooooooooooo..... I am being pushed into the darkness!

Going through the Ant Junit source code should be tough!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant JUnit Reports.
 
Similar Threads
Skipping Test Cases in Test Suites.
Blank Junit Report is generated by ant
Regarding Junit test reports
Taking Report for junit
java.lang.classnotfoundexception in junit report