Testing Dox Module (tendril.dox.testing)

This module provides functions to generate testing documents.

The functions here use the tendril.dox.render module to actually produce the output files after constructing the appropriate stage.

See also

tendril.testing.analysis, which does much of the heavy lifting

Document Generators

render_test_report([session]) Renders the latest test results marked against the specified serialno.
render_device_summary(devicetype[, ...]) Renders a summary of all of the latest test results marked against the serial numbers of the specified devicetype.
tendril.dox.testing.render_test_report(session=None, **kwargs)[source]

Renders the latest test results marked against the specified serialno.

Since this function is defined against the database, all arguments should be keyword arguments.

Parameters:
  • serialno (str or tendril.entityhub.db.SerialNumber) – The serial number of the device.
  • outfolder (str) – The folder in which the output file should be created.
  • session – The database session. If None, the function will make it’s own.
Returns:

The output file path.

Template Used

tendril/dox/templates/testing/test_report_template.tex (Included version)

Stage Keys Provided

sno Serial number of the device.
testdate The timestamp of the latest test suite.
devicetype The device type.
desc The device description.
svnrevision The VCS revision of the project config file.
svnrepo The VCS repository containing the project
graphs A list of graphs, each graph being a list of tuples of (graphpath, graphtitle)
instruments A list of instrument ident strings, one for each unique instrument used in the suites.
suites A list of instances of tendril.testing.testbase.TestSuiteBase or its subclasses.

Note that the suites provided to the template are typically expected to be offline test suites which are reconstructed from the database.

tendril.dox.testing.gen_local_test_results(serialno, devicetype, suites, outfolder=None)[source]
tendril.dox.testing.render_test_report_standalone(serialno, devicetype, suites, outfolder=None)[source]
tendril.dox.testing.render_device_summary(devicetype, include_failed=False, outfolder=None)[source]

Renders a summary of all of the latest test results marked against the serial numbers of the specified devicetype.

Parameters:
  • devicetype (str) – The type of device for which a summary is desired.
  • outfolder (str) – The folder in which the output file should be created.
  • include_failed (bool) – Whether failed test results should be included in the graphs and the statistical analysis. Default False.
Returns:

The output file path.

Template Used

tendril/dox/templates/testing/test_device_summary_template.tex (Included version)

Stage Keys Provided

devicetype The device type.
desc The device description.
svnrevision The VCS revision of the project config file.
svnrepo The VCS repository containing the project
graphs A list of graphs, each graph being a list of tuples of (graphpath, graphtitle)
collector An instance of tendril.testing.analysis.ResultCollector, containing the collated test results.
tendril.dox.testing.get_all_test_reports(limit=None)[source]
tendril.dox.testing.get_latest_test_report(serialno=None)[source]