andriyze
andriyze

Reputation: 484

Run Protractor tests with Test Runner UI in Visual Studio Code

I've been using Webstorm for a while and running protractor there is nice and smooth. Now, I was thinking to start using Visual Studio Code for test run. The only thing I am missing is Test Explorer.

So my setup: Protractor 5.4 + TypeScript 3.4 + Jasmine 3.3

I installed Test Explorer UI and Jasmine Test Explorer (1.5.0) and tried setting up launch.json and jasmine.json for it but it simply doesn't show any tests in the Test Explorer.

my jasmine.json that is located in .vscode folder inside project

{
"spec_dir": "${workspaceRoot}/tmp/specs/",
"spec_files": ["*.spec.js"],
"helpers": ["helpers/**/*.js"],
"random": false,
"seed": null,
"stopSpecOnExpectationFailure": false
}

launch.json

{
  "name": "Launch",
  "type": "node",
  "request": "launch",
  "program": "../node_modules/protractor/bin/protractor",
  "stopOnEntry": false,
  "args": ["${workspaceRoot}/protractor.conf.js"],
}

My issue, no tests are shown. I would like to be able to run tests from Test Explorer. Any help is much appreciated.

Upvotes: 3

Views: 716

Answers (1)

Nikolay Nick
Nikolay Nick

Reputation: 11

Just execute webdriver-manager with npx command in your project folder;

npx webdriver-manager update

Upvotes: 1

Related Questions