Created
June 20, 2021 18:05
-
-
Save sahmeepee/501ff2f13a82c585d5aece653b8f47f8 to your computer and use it in GitHub Desktop.
VSCode setup for Playwright Test Runner - allows debug of current file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch all tests 3 browsers", | |
"request": "launch", | |
"runtimeArgs": [ | |
"run-script", | |
"tests3x" | |
], | |
"runtimeExecutable": "npm", | |
"skipFiles": [ | |
"<node_internals>/**" | |
], | |
"type": "pwa-node" | |
}, | |
{ | |
"name": "Launch all tests", | |
"request": "launch", | |
"runtimeArgs": [ | |
"run-script", | |
"test" | |
], | |
"runtimeExecutable": "npm", | |
"skipFiles": [ | |
"<node_internals>/**" | |
], | |
"type": "pwa-node" | |
}, | |
{ | |
"name": "Launch this test", | |
"request": "launch", | |
"runtimeArgs": [ | |
"exec", | |
"playwright", | |
"test", | |
// When launched via run-script, any backslashes in args get doubled, breaking | |
// matching of directory paths in Windows. | |
// To match on filename only use "${fileBasename}" | |
"${relativeFile}" | |
], | |
"runtimeExecutable": "npm", | |
"skipFiles": [ | |
"<node_internals>/**" | |
], | |
"type": "pwa-node" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "yourprojectname", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"tests3x": "npm exec playwright -- test --config=playwright-3x.config.js", | |
"test": "npm exec playwright -- test" | |
}, | |
"keywords": [], | |
"author": "", | |
"license": "ISC", | |
"devDependencies": { | |
"@playwright/test": "^1.12.2", | |
"playwright": "^1.12.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
playwright-3x.config.js would include a 3 browser setup, i.e. 3 elements inside "projects: []"