Add JUnit HTML report to the JUnit runner

Review Request #3958 — Created May 31, 2016 and submitted

cheister
pants
html-junit-report
3531
pants-reviews
jsirois, patricklaw, stuhood, zundel
Add JUnit HTML report to the JUnit runner

Travis CI: https://travis-ci.org/pantsbuild/pants/builds/134792969

Add a --test-junit-html-report flag that generates an HTML report of test results.

Test success looks like:
https://cloud.githubusercontent.com/assets/399602/15662434/7ad42ea6-26a5-11e6-8cf5-c5005823697e.png

Test failure looks like:
https://cloud.githubusercontent.com/assets/399602/15662436/7efc9f7c-26a5-11e6-9ca8-7c2a5b11f4fb.png

ZU
  1. 
      
  2. Did you consider using a mustache template? That's what we do for most generated HTML.

  3. 
      
CH
ZU
  1. We have been using these reports in our repo for a few months as a standalone script, not integrated directly into pants, but uploaded to be displayed in the UI of our CI runner after every build.

  2. just thinking aloud here: a convenient option might be --open which will launch the browser with the report when it is finished (matches what we do for the ./pants resolve.ivy --open and ./pants server --open

  3. 
      
CH
ST
  1. 
      
  2. src/python/pants/backend/jvm/tasks/junit_run.py (Diff revision 3)
     
     
     
     
     

    junit_run is already very, very complicated.

    If possible, it would be great to see these reports generated as a product of this task, and then consumed by another task that could visualize them.

    Not a blocker, but maybe food for thought.

  3. Concur on the suggestion that this should use mustache.

  4. 
      
CH
ST
  1. Ship It!
  2. 
      
CH
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as ed168ce0a289d2750313d110dc4bc0a1603001d5

Loading...