Rachid O
Rachid O

Reputation: 14002

Run angular end-to-end tests in watch mode

Currently, I run ng e2e every time I make a change in my spec files and every time this command rebuilds the entire project ! is there a way to run the tests without rebuilding the entire project, just like ng test does it.

Upvotes: 9

Views: 2364

Answers (3)

carraua
carraua

Reputation: 1528

Remove

devServerTarget 

from angular.json e2e section.

This way angular won't run ng serve when running the end to end. You will have to have them running in a separate terminal.

Protractor won't re-run on file change.

Upvotes: 4

Will Huang
Will Huang

Reputation: 3586

Just don't run ng e2e directly. It's very slow because it rebuild the whole project every time.

You can try npx protractor e2e/protractor.conf.js to run protractor directly.

Upvotes: 5

flashjpr
flashjpr

Reputation: 470

I believe you can do it yourself with a bit of set up by leveraging the powers of Gulp. Just came across this while watching some slides:

http://ramonvictor.github.io/protractor/slides/#/53

Upvotes: -1

Related Questions