Contains support for EPL code coverage reporting.


class apama.coverage.EPLCoverageWriter(logfile=None, **kwargs)[source]¶

Bases: pysys.writer.testoutput.CollectTestOutputWriter

Writer that collects Apama EPL code coverage files during test execution, and writes an HTML report showing line coverage for each .mon file after testing has completed.

To configure this writer, add it to your pysysproject.xml and set the required destDir property (a typical value would be __coverage_epl.${outDirName}), and optionally other configuration properties.

To enable it at runtime, run pysys with -XcodeCoverage (or alternatively, -XeplCoverage).

If coverage is generated, the directory containing all coverage files is published as an artifact named “EPLCoverageDir”. Optionally an archive of this directory can be generated by setting the destArchive property (see pysys.writer.testoutput.CollectTestOutputWriter), and published as “EPLCoverageArchive”.

New in version 10.7.0.

The following property can be set in the project configuration for this writer (and see also pysys.writer.testoutput.CollectTestOutputWriter for inherited properties such as destDir (required) and destArchive):

srcIncludes = []¶

List of EPL source file patterns to include. Default is **.

srcExcludes = []¶

List of EPL source file patterns to exclude, e.g. **/foo/Bar*.mon, **/baz/*.mon.

In addition to the specified exclusions, files under APAMA_HOME, the test root dir, any test input dirs (Input/*.mon) and any temporary (*.tmp.mon) files are excluded.

srcSearchDirs = []¶

List of directories that will be searched to locate source files that were injected without an absolute path.

args = []¶

Additional command line arguments to pass to epl_coverage.

title = ''¶

Title for the HTML coverage report.