Hi!
Running e2e tests is really slow. At the point that developing e2e test is stopping part of our team most of the time. Most of the tests development processes are RED/GREEN but if the time you have to wait between running each suite of tests is up to 30 seconds... (more with sourcemaps enabled and aot) it's super difficult.
There are another issues that could potentially help how to work with e2e tests #2861
x)- [ ] bug report -> please search issues before submitting
- [x] feature request
@angular/cli: 1.1.1
node: 6.9.0
os: linux x64
@angular/animations: 4.2.2
@angular/common: 4.2.2
@angular/compiler: 4.2.2
@angular/core: 4.2.2
@angular/forms: 4.2.2
@angular/http: 4.2.2
@angular/material: 2.0.0-beta.6
@angular/platform-browser: 4.2.2
@angular/platform-browser-dynamic: 4.2.2
@angular/router: 4.2.2
@angular/cli: 1.1.1
@angular/compiler-cli: 4.2.2
launch ng e2e
Speed
I've also requested a watch support on e2e,
Our QA team is really suffering from this.
Our project is pretty large, the loading time is crazy, and you know -sometime you just need to use "trail and error" with the tests- and it's almost impossible.
The ng e2e --watch issue is https://github.com/angular/angular-cli/issues/2861. That could help with the time it takes to rebuild the app itself before launching the e2e tests themselves.
This leaves the time that e2e tests take to run proper. They are inherently slow. I've seen some suites take 10 minutes. Perhaps using chrome in headless mode is faster, I haven't tested.
Happy to leave this open for discussion.
I use
beforeEach(() => browser.waitForAngularEnabled(false));
afterEach(() => browser.waitForAngularEnabled(true));
I know this is weird, but allow speed up e2e in my usecase.
Edit
I have noticed these problems can be avoided by using the -s flag and setting it to false. See this comment for reference
@filipesilva The problem people are having is, the project having to re-compile every time they re-run the e2e tests.
I understand why people want a --watch flag, its because writing tests is so tedious at the moment.
The flow looks something like this
Write test -> run ng e2e -> wait for project to compile -> check for errors -> modify test
The bottleneck isn't the speed of protractor here, but the project having to re-compile every test iteration. A solution for this would be to build the project once and use that every test.
Any updates on this? It would be great if we have solution for this. It's a painful procedure.
Developing e2e tests is really slow. There is gotta be a way to persist the server that updated tests can be run against? Going through recompile cycle each time takes forever and discourages dev to write tests.
Almost 2 years passed, any new information ? We are also experiencing very slow e2e development and our workflow is similar to mentioned above:
Write test - run e2e -> wait compile -> modify test
You can now run ng serve in one console while running ng e2e --devServerTarget= to prevent the e2e from rebuilding your app.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Edit
I have noticed these problems can be avoided by using the
-sflag and setting it to false. See this comment for reference@filipesilva The problem people are having is, the project having to re-compile every time they re-run the e2e tests.
I understand why people want a
--watchflag, its because writing tests is so tedious at the moment.The flow looks something like this
Write test -> run
ng e2e-> wait for project to compile -> check for errors -> modify testThe bottleneck isn't the speed of protractor here, but the project having to re-compile every test iteration. A solution for this would be to build the project once and use that every test.