commit a12510f14060b67121532c22e9d06df8d2c5b01f Author: Arturo Filastò hellais@torproject.org Date: Sat Jun 2 14:03:25 2012 +0200
Add basic structure for test writing docs --- docs/writing_tests.md | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/docs/writing_tests.md b/docs/writing_tests.md new file mode 100644 index 0000000..460620a --- /dev/null +++ b/docs/writing_tests.md @@ -0,0 +1,17 @@ += Writing OONI Tests = + +There are two modes of writing tests. The first way is by making the Test +blocking and have each instance of a test run in a separate thread. The other +is by making them non-blocking using the twisted deferred non blocking pattern. + +The first kind of mechanism relied of writing a test that uses blocking code +and each instance of it is run inside of a separate thread. Beware that your +blocking code must be thread safe to run properly (as is obvious :P) + +The other menthod invloves having some knowledge about twisted. The test you +will write will be written in twisted and should implement async style non +blocking architecture. + +It is recommended that tests are written using the second pattern and the first +should only be used for runnign tests that have been previously written. +
tor-commits@lists.torproject.org