Run angular end-to-end tests in watch mode
Asked Answered
P

3

9

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.

Protohistory answered 26/5, 2017 at 13:47 Comment(0)
S
5

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.

Sensuous answered 15/11, 2019 at 18:47 Comment(1)
the fastest workflow I've got was this npx protractor ... + vscode's rerun task keyboard shortcut.Phip
P
4

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.

Postiche answered 17/1, 2020 at 14:10 Comment(0)
B
-1

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

Bergeron answered 7/8, 2018 at 1:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.