These Ant targets include the Scala tests.
Some of the JUnit tests include Python application API and decorator operator tests (e.g. test packages with python
, splpy
).
unitest.main
- Runs Java application api tests usingEMBEDDED_TESTER
contextunitest.standalone
- Runs Java application api tests usingSTANDALONE_TESTER
contextunitest.distributed
- Runs Java application api tests usingDISTRIBUTED_TESTER
context
Ant targets:
test.python2
- Runs a subset of the tests for functionality that is supported on Python 2.test.python3
- Runs Python tests.
Most testing is performed using Python unittest.
test/python/topology
- Python topology tests (application API).- Any test starting with
test2
uses the testing capability supported by the toolkit. - Most
test2
tests have three classes running the same test in standalone, distributed and streaming analytics service. Typically the base class is the standalone tests, then subclasses exist for distributed and streaming analytics. test2
standalone tests are skipped if environment variableSTREAMS_INSTALL
is not set.test2
distributed tests are skipped if any of the environment variablesSTREAMS_INSTALL
,STREAMS_DOMAIN_ID
orSTREAMS_INSTANCE_ID
is not set is not set.test2
streaming analytics tests are skipped if environment variableVCAP_SERVICES
is not set.
- Any test starting with
test/rest
- Python Streams REST API tests.
These tests can be run directly using Python, e.g.
cd test/python/topology
# Run all test2 tests
python3 -u -m unittest test2*.py
# Run all tests in test2_spl.py
python3 -u -m unittest test2_spl
# Run a single class from a test file
# e.g. run only distributed tests for test2_spl
python3 -u -m unittest test2_spl.TestDistributedSPL
# Run a single test
python3 -u -m unittest test2_spl.TestDistributedSPL.test_SPLBeaconFilter
Full set of tests assumes setup is correct for running distributed and Streaming Analytics
Run these ant
targets in test/java
unitest.main
unitest.standalone
unitest.distributed
Run python3 -u -m unittest
in each of these directories:
test/spl/tests
Run python3 -u -m unittest
in each of these directories:
test/python/topology
test/python/spl/tests
test/python/scripts
test/python/rest
Ideally this would be a single command (nosetests) but it's not yet supported.
Since Streaming Analytics is only Python 3.5 these tests should be run without a VCAP_SERVICES
environment variable set.
Run python -u -m unittest
in each of these directories:
A distributed environment with a 2.7 Python setup must exist (and STREAMS_INSTANCE_ID
set to it.)
test/python/topology
test/python/spl/tests
Ideally this would be a single command (nosetests) but it's not yet supported.