predictionio-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [39/52] [abbrv] incubator-predictionio git commit: Added for the integration tests
Date Tue, 09 Aug 2016 21:43:47 GMT
Added for the integration tests


Branch: refs/heads/develop
Commit: 092cdfd40d14aad85980fc75fa56bd197ddba63d
Parents: 3648ba1
Author: Marcin Ziemiński <>
Authored: Wed Aug 3 15:02:42 2016 -0700
Committer: Marcin Ziemiński <>
Committed: Wed Aug 3 16:23:18 2016 -0700

 testing/pio_tests/             | 43 ++++++++++++++++++++++++++++
 testing/pio_tests/scenarios/ |  0
 2 files changed, 43 insertions(+)
diff --git a/testing/pio_tests/ b/testing/pio_tests/
new file mode 100644
index 0000000..c885ab5
--- /dev/null
+++ b/testing/pio_tests/
@@ -0,0 +1,43 @@
+# PredictionIO - Integration Tests
+This python module introduces a basic framework for adding integration tests to
+PredictionIO. It is nothing more than a collection of utility functions mostly being wrappers
+over shell executed commands.
+### Prerequisites
+In order to execute tests, besides a configured **PredictionIO** environment one
+has to download the following python-3 packages:
+* requests
+* unittest
+* xmlrunner
+### Execution
+** - the executable script. Launches eventserver to be available for the tests.
+You can pass it arguments to:
+* suppress the output of executed shell commands within the tests
+* enable logging
+* specify which tests should be exectued (by names)
+For more information run:
+python3 -h
+As soon as the tests are finishied an XML file with JUnit-like test reports 
+is created in the directory of execution.
+### Adding new tests
+Every test should be an instance of **pio_tests.integration.BaseTestCase** defined in **pio_tests.integration**.
+Upon creation, a **pio_tests.integration.TestContext**  object is provided to it with description
+* ip address and a port of running eventserver
+* directories containing stored engines and data for specific tests
+Every test should be registered in the appropriate place in ** file, whereas
+its definition should reside in **pio_tests.scenarios** module. If the test requires some
additional files
+during the execution, you should put them under *data* directory mentioned above.
+The best way to test different application engines is to make use of **pio_tests.utility.AppEngine**.
+Apart from containing utility functions, it downloads engine templates if necessary.
+To see an example of implemented test check **pio_tests.scenarios.quickstart_test**, which
+a repetition of the QuickStart tutorial from the doc site.
diff --git a/testing/pio_tests/scenarios/ b/testing/pio_tests/scenarios/
new file mode 100644
index 0000000..e69de29

View raw message