From 1ade4fb6089e7e1c54dc80e8fe8d4b22cfdb03d2 Mon Sep 17 00:00:00 2001 From: Lorenz Herzberger Date: Mon, 11 Apr 2022 13:26:35 +0200 Subject: [PATCH] added VS Code debugging section to tests/README.md Signed-off-by: Lorenz Herzberger --- tests/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/README.md b/tests/README.md index dbe96f3..fdff8ef 100644 --- a/tests/README.md +++ b/tests/README.md @@ -15,3 +15,11 @@ Most of the tests in the `tests/` folder are unit tests. For info about how to w Notes on Running a Local Dev Node as Processes (and Running All Tests)](http://docs.planetmint.com/projects/contributing/en/latest/dev-setup-coding-and-contribution-process/run-node-as-processes.html) Note: There are acceptance tests in the `acceptance/` folder (at the same level in the hierarchy as the `tests/` folder). + +## Debugging test cases with VS Code + +In order to debug unit tests create a virtual environment and install all necessary dependencies. VS Code should notify you that a new virtual environment is detected and ask if you want to use it as environment (more info: [Getting started with Python in VS Code](https://code.visualstudio.com/docs/python/python-tutorial)). + +Configure the tests in VS Code by goint to the `Testing` tab and click `Confiugre Python Tests` and select `pytest`. VS Code should now detect all test cases inside of `tests`. Click `Debug Tests` to run the tests with the debugger attached. (more info: [Python testing in VS Code](https://code.visualstudio.com/docs/python/testing)) + +Note: `pip install .` will not automatically install the test dependencies. If missing install them manually. \ No newline at end of file