From 06d60228fdbe75641998f6e82c6bda981379607b Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 31 May 2017 15:27:50 +0200 Subject: [PATCH] Added description on how to debug smoke test. --- test/smoke/CONTRIBUTING.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/test/smoke/CONTRIBUTING.md b/test/smoke/CONTRIBUTING.md index 8aaef8a7875..7b403022778 100644 --- a/test/smoke/CONTRIBUTING.md +++ b/test/smoke/CONTRIBUTING.md @@ -11,4 +11,25 @@ To contribute a new smoke test area, add `${area}.ts` file under `./areas`. This has to follow the bot-style approach described in the links mentioned above. Methods should be calling WebDriverIO API through `SpectronClient` class. If there is no existing WebDriverIO method, add it to the class. # Adding new test -To add new test area or test, `main.ts` should be updated. The same instruction-style principle needs to be followed with the called area method names that reflect manual tester's actions. \ No newline at end of file +To add new test area or test, `main.ts` should be updated. The same instruction-style principle needs to be followed with the called area method names that reflect manual tester's actions. + +# Debugging +1. Add the following configuration to launch.json, specifying binaries in `args`: +```json +{ + "type": "node", + "request": "launch", + "name": "Launch Smoke Test", + "program": "${workspaceRoot}/test/smoke/src/main.js", + "cwd": "${workspaceRoot}/test/smoke", + "port": 9999, + "args": [ + "-l", + "path/to/Code.exe" + ], + "outFiles": [ + "${cwd}/out/**/*.js" + ] +}, +``` +2. In main.js add `--debug-brk=9999` argument to the place where `src/mocha-runner.js` is spawned. \ No newline at end of file