Apama 10.15.1 | Release Notes | What's New In Apama 10.15.1 | PySys ApamaHelper class in 10.15.1
 
PySys ApamaHelper class in 10.15.1
The template for newly created PySys test projects and individual PySys tests has been changed to use a different approach for making Apama helper functionality available through the self.apama field. The previous approach was to use a <test-plugin> element in the pysysproject.xml file to make the ApamaTestPlugin available to tests as self.apama. However, this resulted in testcases that could not be fully parsed by Python IDEs and editors. Instead, a new pattern is now recommended in which each test explicitly subclasses a new helper class which adds the self.apama field in an IDE-friendly manner. There is no need to remove the use of <test-plugin> from existing projects, but it is no longer recommended for new projects, and in all cases, it is recommended to inherit from ApamaHelper in new testcases:
from apama.testplugin import ApamaHelper
class PySysTest(ApamaHelper, pysys.basetest.BaseTest):
...
To make use of editor code completion and navigation, configure the editor with a PYTHONPATH environment variable matching the PYTHONPATH from an Apama command prompt or apama_env invocation. You may also need to add any custom PySys extension classes of your own from your pysysproject.xml. Some editors allow environment variables like this to be configured by creating an .env file in your project directory.