Thursday, July 14, 2011

Hudson integration with JUnit

my ANT build.xml :




  
      
           
      
  


  
    
      
      
      
          
      
    

    

    
  
  
    
  


 





Once I configure Hudson with a valid ANT installation, running the test produces a
junitreport under the /home/a087/.hudson (hudson's home dir)

In fact the "Publish JUnit test result report " Hudson option accepts the parameter
"Test report XMLs" with the notation **/reports/*.xml relative to the /home/a087/.hudson directory! (it took some time to figure out)

The TESTS-TestSuites.xml file produced contains aggregate info on all the tests run:


  
      
      

      

....

  





And it happily appears on the "Test Result" tab


If you get
Fingerprinting not enabled on this build. Test aggregation requires fingerprinting

in Post-build Actions, enable "Record fingerprints of files to track usage "
and enter **/reports/*.xml in "Files to fingerprint"



More on TESTS-TestSuites.xml and JUnitReport

No comments: