Added description on how to debug smoke test.

This commit is contained in:
Michel Kaporin 2017-05-31 15:27:50 +02:00
parent e70d11da0b
commit 06d60228fd

View file

@ -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.
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.