You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@predictionio.apache.org by do...@apache.org on 2016/08/09 21:43:47 UTC

[39/52] [abbrv] incubator-predictionio git commit: Added README.md for the integration tests

Added README.md for the integration tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/commit/092cdfd4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/tree/092cdfd4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/diff/092cdfd4

Branch: refs/heads/develop
Commit: 092cdfd40d14aad85980fc75fa56bd197ddba63d
Parents: 3648ba1
Author: Marcin Ziemi\u0144ski <zi...@gmail.com>
Authored: Wed Aug 3 15:02:42 2016 -0700
Committer: Marcin Ziemi\u0144ski <zi...@gmail.com>
Committed: Wed Aug 3 16:23:18 2016 -0700

----------------------------------------------------------------------
 testing/pio_tests/README.md             | 43 ++++++++++++++++++++++++++++
 testing/pio_tests/scenarios/__init__.py |  0
 2 files changed, 43 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/092cdfd4/testing/pio_tests/README.md
----------------------------------------------------------------------
diff --git a/testing/pio_tests/README.md b/testing/pio_tests/README.md
new file mode 100644
index 0000000..c885ab5
--- /dev/null
+++ b/testing/pio_tests/README.md
@@ -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
+*tests.py* - 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:
+```shell
+python3 tests.py -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 of:
+* 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 *tests.py* 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 is
+a repetition of the QuickStart tutorial from the doc site.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/092cdfd4/testing/pio_tests/scenarios/__init__.py
----------------------------------------------------------------------
diff --git a/testing/pio_tests/scenarios/__init__.py b/testing/pio_tests/scenarios/__init__.py
new file mode 100644
index 0000000..e69de29