Apama 10.11.3 | Release Notes | What's New In Apama 10.3.0 | PySys changes in 10.3.0
 
PySys changes in 10.3.0
Apama now ships PySys 1.3 instead of PySys 1.2. Release notes for PySys 1.3 can be found in Apama\third_party\python\Lib\site-packages\pysys-release.txt on Windows and in Apama/third_party/python/lib/python3.6/site-packages/pysys-release.txt on Linux.
The sample pysysproject.xml file has been updated to support the new features, details of which are explored further down below.
A new Apama PySys base test class for use in new PySys test cases has been added. Using this class means that PySys methods that read or write files (such as waitForSignal or assertGrep) will use character strings rather than byte strings and UTF-8 encoding for certain file types: .xml, .yaml, .json, .log.
Key features for the new PySys 1.3 release include:
*PySys tests can now be written and executed using Python 3.
*Support was added for coloring console output to highlight passes, fails, warnings, and more. This is enabled by default in the example pysysproject.xml configuration file shipped with Apama. Coloring can also be enabled or disabled for a particular user and/or machine by setting the PYSYS_COLOR environment variable to true or false. Coloring works on any terminal that supports ANSI escape sequences (for example, most UNIX terminals). On Windows, coloring works using the colorama library that is installed into the Python included with Apama.
*A framework was added for recording performance results (such as throughput or latency) that are measured by PySys tests. This includes storage of results in a human-readable and/or machine-parseable CSV file, together with run-specific information such as the host where the test was executed. The CSV files can be aggregated across multiple test runs and/or cycles. See BaseTest.reportPerformanceResult() for more details.
*A --progress command line option was added (can also be switched on by setting the PYSYS_PROGRESS environment variable to true), which logs a summary of how many tests have executed, the outcomes, a list of most recent failure reasons, and a list of what other tests are currently executing. This provides helpful feedback to you while executing a long test run.
*A defaultIgnoreExitStatus project property was added which controls whether non-zero return codes from startProcess() result in test failures when the ignoreExitStatus flag is not explicitly specified. This property defaults to True if not explicitly configured, which retains behavior for existing tests.
However to promote best practice for new PySys projects, the example PySys project configuration file included with Apama sets defaultIgnoreExitStatus to False, which ensures that processes which return failure codes are not ignored unless explicitly intended by the author of the test case. We recommend changing existing projects to set defaultIgnoreExitStatus to False and also to set abortOnError to True in the project file so that unintentional process failures do not go unnoticed.
*With PySys 1.3, the pysys.py run command now returns a non-zero exit code if any tests failed (previously, this command returned 0 on any failed tests).
API documentation for PySys and the Apama PySys extensions can be found in the API Reference for Python.
The use of PySys 1.3 has introduced some backwards compatibility changes. See Miscellaneous changes in 10.3.0 affecting backwards compatibility for detailed information.