corejet.testrunner

A test runner which can output an XML report compatible with JUnit and Hudson/Jenkins as well as XML an...
Download

corejet.testrunner Ranking & Summary

Advertisement

  • Rating:
  • License:
  • ZPL
  • Publisher Name:
  • Martin Aspeli
  • Publisher web site:
  • http://plone.org/support

corejet.testrunner Tags


corejet.testrunner Description

A test runner which can output an XML report compatible with JUnit and Hudson/Jenkins as well as XML and HTML reports compatible with the CoreJet BDD standard corejet.testrunner provides an extension to the test runner to the one that ships with zope.testrunner, as well as a buildout recipe based on zc.recipe.testrunner to install a test script for this test runner.It is based on (and can be used as a wholesale replacement for), collective.xmltestreport.The test runner is identical to the one in zope.testrunner, except: it is capable of writing test reports in the XML format output by JUnit/Ant. This allows the test results to be analysed by tools such as the Hudson/Jenkins continuous integration server. it can output reports in the CoreJet XML format - see corejet.coreUsage:In your buildout, add a part like this:parts = ... test...recipe = corejet.testrunnereggs = my.packagedefaults = The recipe accepts the same options as zc.recipe.testrunner, so look at its documentation for details.When buildout is run, you should have a script in bin/test and a directory parts/test.To run the tests, use the bin/test script. If you pass the --xml option, test reports will be written to parts/test/testreports directory:bin/test --xml -s my.packageIf you are using Hudson, you can now configure the build to publish JUnit test reports for < buildoutdir >/parts/test/testreports/*.xml.To output a CoreJet report, do:bin/test --corejet="file,path/to/corejet/file.xml" -s my.packageThe CoreJet report and output XML file will be placed in parts/test/corejet. You can combine --xml and --corejet.The example above uses the file CoreJet repository source, which expects to find a CoreJet XML file at the path specified after the comma.Repository sourcesOther repository sources can be registered via entry points: Packages must register an entry point under corejet.repositorysource identifying a callable that is passed the string after the comma with a unique name and which should return a corejet.core.model.RequirementsCatalogue object.Hence, the file source is defined as:def fileSource(path): catalogue = RequirementsCatalogue() with open(path) as stream: catalogue.populate(stream) return catalogueand registered with:file = corejet.testrunner.filesource:fileSourceUse bin/test --help for a full list of options. Requirements: · Python What's New in This Release: · Fix broken package


corejet.testrunner Related Software