Re: What's a good XSL to translate xmlrunner.py output into a test report?

2010-06-13 Thread Stefan Behnel

Phlip, 06.06.2010 19:12:

Here's xmlrunner.py:

  http://www.rittau.org/python/xmlrunner.py

you attach it to your developer tests, and it emits a file called
TEST-unittest.TestSuite.xml, containing auspicious wackiness like
this:

   testcase
classname=tests.unit.gateways.authorize_net_tests.AuthorizeNetTests
name=test_failed_credit time=0.0017/testcase
   testcase
classname=tests.unit.gateways.authorize_net_tests.AuthorizeNetTests
name=test_fraudulent_avs_result time=0.0010/testcase
   testcase
classname=tests.unit.gateways.authorize_net_tests.AuthorizeNetTests
name=test_fraudulent_cvv_result time=0.0011/testcase


Bump? Anyone reporting on their unit tests here?


I only use XML reporting in combination with the Hudson-CI tool. It parses 
the output and (amongst other things) reports the results over a serious of 
builds through its web site. It's also very easy to set up, so maybe that's 
what you are actually looking for?


Stefan

--
http://mail.python.org/mailman/listinfo/python-list


Re: What's a good XSL to translate xmlrunner.py output into a test report?

2010-06-06 Thread Phlip
On Jun 3, 9:47 am, Phlip phlip2...@gmail.com wrote:
 Hypo Nt:

 Here's xmlrunner.py:

  http://www.rittau.org/python/xmlrunner.py

 you attach it to your developer tests, and it emits a file called
 TEST-unittest.TestSuite.xml, containing auspicious wackiness like
 this:

   testcase
 classname=tests.unit.gateways.authorize_net_tests.AuthorizeNetTests
 name=test_failed_credit time=0.0017/testcase
   testcase
 classname=tests.unit.gateways.authorize_net_tests.AuthorizeNetTests
 name=test_fraudulent_avs_result time=0.0010/testcase
   testcase
 classname=tests.unit.gateways.authorize_net_tests.AuthorizeNetTests
 name=test_fraudulent_cvv_result time=0.0011/testcase

 That looks just like the kind of stereotypical XML thatXSLwas
 designed to convert into HTML, for civilian reading! All the verbiage
 for XML test runners claim they do JUnit output, so that JUnitXSL
 files can convert them into HTML.

 So here's a sample JUNIT.XSL:

 http://www.google.com/codesearch/p?hl=en#T32D24pjTaw/trunk/test-integ...

 It contains matchers like these:

   xsl:template match=testcase mode=print.test

 And when I run it with this command line...

    xsltproc JUNIT.XSLTEST-unittest.TestSuite.xml

 ...it outputs nothing!

 Long story short, how do I format my test output prettily? All the
 bloggage on this seems to assume that everyone already knows this
 because _everyone_ graduated to Python thru Java...

Bump? Anyone reporting on their unit tests here?
-- 
http://mail.python.org/mailman/listinfo/python-list


What's a good XSL to translate xmlrunner.py output into a test report?

2010-06-03 Thread Phlip
Hypo Nt:

Here's xmlrunner.py:

  http://www.rittau.org/python/xmlrunner.py

you attach it to your developer tests, and it emits a file called
TEST-unittest.TestSuite.xml, containing auspicious wackiness like
this:

  testcase
classname=tests.unit.gateways.authorize_net_tests.AuthorizeNetTests
name=test_failed_credit time=0.0017/testcase
  testcase
classname=tests.unit.gateways.authorize_net_tests.AuthorizeNetTests
name=test_fraudulent_avs_result time=0.0010/testcase
  testcase
classname=tests.unit.gateways.authorize_net_tests.AuthorizeNetTests
name=test_fraudulent_cvv_result time=0.0011/testcase

That looks just like the kind of stereotypical XML that XSL was
designed to convert into HTML, for civilian reading! All the verbiage
for XML test runners claim they do JUnit output, so that JUnit XSL
files can convert them into HTML.

So here's a sample JUNIT.XSL:

http://www.google.com/codesearch/p?hl=en#T32D24pjTaw/trunk/test-integration-ui/resources/test-plugins/org.eclipse.swtbot.eclipse.junit4.headless_2.0.0.329-dev/JUNIT.XSL

It contains matchers like these:

  xsl:template match=testcase mode=print.test

And when I run it with this command line...

   xsltproc JUNIT.XSL TEST-unittest.TestSuite.xml

...it outputs nothing!

Long story short, how do I format my test output prettily? All the
bloggage on this seems to assume that everyone already knows this
because _everyone_ graduated to Python thru Java...

--
  Phlip
  http://c2.com/cgi/wiki?ZeekLand
-- 
http://mail.python.org/mailman/listinfo/python-list