From d0df62770f41969b7f89491eacb3c08ea84a1468 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Fri, 15 Jan 2021 19:41:31 +0000 Subject: [PATCH] added doc that describes testing --- docs/dev/running-tests.md | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 docs/dev/running-tests.md diff --git a/docs/dev/running-tests.md b/docs/dev/running-tests.md new file mode 100644 index 00000000..0813b6d0 --- /dev/null +++ b/docs/dev/running-tests.md @@ -0,0 +1,44 @@ +# Running Onionr tests + +Onionr has four types of tests: + +* unittests +* integration tests +* selenium tests (web tests) +* runtime-tests + + +## unittests + +Onionr uses Python's built in unittest module. These tests are located in tests/ (top level) + +Run all tests with `$ make test`, which will also run integration tests. + +Please note that one unittest tests if runtime-tests have passed recently. This is simply a forceful reminder to run those tests as well. + +You can also run a single unittest in a loop by using the script scripts/run-unit-test-by-name.py + +## integration tests + +These tests are pretty basic and test on stdout of Onionr commands. + +They are also run from `$ make test` + +The runtime-tests do most of the actual integration testing. + +## selenium tests + +These are browser automation tests to test if the UI is working as how it should for a user. + +There's only a couple and they're incomplete, so they can be ignored for now (test manually) + +## runtime-tests + +These are important. They look into the Onionr client Flask app when Onionr daemon is running and test a bunch of things. + +If you do it a lot you should make your own Onionr network (disable official bootstrap) + +You run this while the daemon is running (probably should make sure onboarding is done), with `$ onionr.sh runtime-test` + +It's necessary to do this before running `$ make test` for unittesting +