summaryrefslogtreecommitdiff
path: root/test/Readme.md
diff options
context:
space:
mode:
Diffstat (limited to 'test/Readme.md')
-rw-r--r--test/Readme.md34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/Readme.md b/test/Readme.md
new file mode 100644
index 0000000..d9a3de8
--- /dev/null
+++ b/test/Readme.md
@@ -0,0 +1,34 @@
+Testing Strategy
+================
+
+Dispatcher Integration Tests
+----------------------------
+
+The dispatcher hands the requests to different handlers and responds with the
+first response it gets. We test the integration between the dispatcher and the
+handlers. We do so by confirming that a given query is handed to the right
+source in the expected manner.
+In order to do so we mock the sources. We also keep the server out of the loop.
+This way these tests should be deterministic and fast.
+
+Remote Tests
+------------
+
+Test the interaction of our sources with remote services. These tests make
+use of the real network. Therefore they are prone to network errors and non-
+deterministic server responses. With the expected result they will pass. Known
+failure cases should be covered in a unit test and lead to skipping the remote
+test. Unexpected remote behaviour should cause an Error. If you observe such an
+error:
+ * create a unit test for the source that triggers the same behaviour
+ * handle it appropriately in the source
+ * change the integration test to skip if the same behaviour happens again.
+
+
+Source Unit Tests
+-----------------
+
+As described above these should cover all possible network issues and make sure
+we return the right response in these cases.
+We can trigger the observed remote behaviour by mocking the adapter and thus
+make it deterministic.