From 9c57cd1776242f02130a1a649e53dc4a80d2e3ea Mon Sep 17 00:00:00 2001 From: Hamza Khan Date: Fri, 8 Aug 2025 16:07:49 +0100 Subject: [PATCH 1/2] NRL-1563 Correct typos --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 92fe43933..dc1c14b44 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ To run all the feature integration tests: make test-features-integration ``` -To run indivudal feature test scenario(s) using the custom tag : +To run individual feature test scenario(s) using the custom tag : 1. Add `@custom_tag` before each 'Scenario' that needs to be run (in each .feature file) 2. Run the command below: @@ -104,7 +104,7 @@ To run indivudal feature test scenario(s) using the custom tag : make integration-test-with-custom_tag ``` -To run all the feature integration tests and generate an interactive Allure report therafter : +To run all the feature integration tests and generate an interactive Allure report thereafter : ``` make test-features-integration-report From 014afadfc580bbd43302e3455eaffd59c7da05cf Mon Sep 17 00:00:00 2001 From: Hamza Khan Date: Fri, 8 Aug 2025 16:52:00 +0100 Subject: [PATCH 2/2] NRL-1563 Update Readme.md with debugging section --- README.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/README.md b/README.md index dc1c14b44..43a979853 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,71 @@ To run all the feature integration tests and generate an interactive Allure repo make test-features-integration-report ``` +### Debugging Behave Integration Tests in VS Code + +Integration tests can be debugged directly in **VS Code** using a launch configuration. Instructions on how to set this up for the first time and run the debugger are below. + +--- + +#### 1. Create the Launch Configuration + +To get started: + +1. Open VS Code and press `Ctrl+Shift+P` +2. Search for **“Add Configuration”** and select it +3. Choose **Python** > **Module** +4. Replace the generated entry in `.vscode/launch.json` with an appropriate launch.json configuration. Below is a example which can be modified as required: + +```json +// .vscode/launch.json +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug Behave", + "type": "debugpy", + "request": "launch", + "module": "behave", + "args": [ + "-D", + "env=example-env", + "tests/features", + "-D", + "integration_test=true", + "--tags=@custom_tag" + ], + "console": "integratedTerminal", + "justMyCode": true, + "env": { + "PYTHONPATH": "${workspaceFolder}" // adds your project code to Python path + }, + "cwd": "${workspaceFolder}" // resolves to the root directory + } + ] +} +``` + +Once steps 1-4 are done, "Debug Behave" should appear in the Run and Debug panel. + +#### 2. Customizing the Debug Configuration + +You can tailor the args section in .vscode/launch.json to suit your specific environment, tags, or test structure. + +For example: +To run only tests with the @api tag, set the --tags accordingly: + +``` +"args": ["--tags=@api"..] +``` + +#### 3. Running the Debugger + +To start debugging using the launch configuration from VS Code: + +1. Go to the Run and Debug panel `Ctrl+Shift+D` +2. Ensure **“Debug Behave”** (if this is the name used in **“launch.json”**) is selected from the dropdown at the top +3. Press `F5` to start debugging + ### Smoke testing For smoke tests, you need to have deployed your infrastructure (using Terraform).