summaryrefslogtreecommitdiffstats
path: root/docs/source/contributing/testing.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-24 17:38:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-24 17:38:25 +0000
commitd269eb36c8f4d05fb0f8e9b8a00998dd41f0c829 (patch)
tree4268cb5c733a3b88e7c5b765a30f5b9fd81c804e /docs/source/contributing/testing.md
parentAdding upstream version 2.1.1. (diff)
downloaddeluge-d269eb36c8f4d05fb0f8e9b8a00998dd41f0c829.tar.xz
deluge-d269eb36c8f4d05fb0f8e9b8a00998dd41f0c829.zip
Adding upstream version 2.1.2~dev0+20230529.upstream/2.1.2_dev0+20230529
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/source/contributing/testing.md')
-rw-r--r--docs/source/contributing/testing.md50
1 files changed, 50 insertions, 0 deletions
diff --git a/docs/source/contributing/testing.md b/docs/source/contributing/testing.md
new file mode 100644
index 0000000..beb30a4
--- /dev/null
+++ b/docs/source/contributing/testing.md
@@ -0,0 +1,50 @@
+# Running tests
+
+Testing uses [PyTest] framework and [PyTest-Twisted] to handle Twisted framework.
+
+## Testing
+
+The tests are located in the source folder under `deluge/tests`.
+The tests are run from the project root directory.
+View the unit test coverage at: [deluge-torrent.github.io](http://deluge-torrent.github.io)
+
+### Pytest
+
+ pytest deluge/tests
+ pytest deluge/tests/test_client.py
+ pytest deluge/tests/test_client.py -k test_connect_localclient
+
+### Plugin
+
+Running the tests for a specific plugin (requires [pytest](https://pypi.python.org/pypi/pytest)):
+
+ pytest deluge/plugins/<name-of-plugin>
+
+## Tox
+
+All the tests for Deluge can be run using [Tox](https://pypi.python.org/pypi/tox)
+
+### See available targets:
+
+ tox -l
+ py3
+ lint
+ docs
+
+### Run specific test:
+
+ tox -e py3
+
+### Verify code with pre-commit:
+
+ tox -e lint
+
+## CI
+
+Deluge develop branch is tested automatically by GitHub actions.
+
+When creating a pull request (PR) on [github], units tests will be automatically be run.
+
+[github]: https://github.com/deluge-torrent/deluge/pulls
+[pytest]: https://docs.pytest.org/en/
+[pytest-twisted]: https://github.com/pytest-dev/pytest-twisted