1

I am playing a bit with nosetests and I am missing the feature where I can output detailed information about the tests.

For example I am testing a colored spectrum random generator where the asserts are put on particular frequencies. However, It would be interesting to output an html report with a frequency plot and some statistics about the test.

At the end of the day I would like to be able to insert in the report some detailed information in such manner:

def test():
   """ Example. """
   report.insertPlot() #numpy plot
   report.insertText("Some text")
   report.insertSeparator() # would probably insert a <hr> tag

I currently notice that just doing this below does not work.

def test():
   """ Example. """
   print "Some text that I wish to see in my report"

How to generate a detailed test report with nose?

nowox
  • 25,978
  • 39
  • 143
  • 293
  • Have a look at this: http://stackoverflow.com/questions/5975194/nosetests-is-capturing-the-output-of-my-print-statements-how-to-circumvent-this – Markon Oct 30 '15 at 13:26
  • First install coverage for nose, then type $nosetest --with-coverage test.py, and that should give you detailed information about your test – copser Oct 31 '15 at 10:33
  • @PetarP I don't think `coverage` is related to this quesiton. My idea is to record *manual* information from a test function. – nowox Oct 31 '15 at 20:02

0 Answers0