TLDR: There is a chance that you might still want to use Protractor when version 6 is released. But not today. As of today, it is recommended to s...
For further actions, you may consider blocking this person and/or reporting abuse
The reason 2 to 5 isn't a argument, only the 1 is a argument to why don't use protractor.
1. Protractor is not updated
Yeah, 8 months on version 5.4.2, because the version 6 has some problems :(
2. Protractor 6 will break compatibility
That's normal on any major release on any framework, because the most open source project use semantic versioning.
3. Protractor is overcomplicated
That's not true, is so easy and had many good features, the setup is so easy, the minimum needed is where directory the spec are.
Example:
4. Protractor not driving a good design
That's not true, your example is a result of the knowledge of the coder who does not know good automation practices. In any framework it will create a bad design like this.
5. Protractor is not required for Angular
Why that's bad?
Note: Webdriverio and codeceptjs can't be considered a 'modern framework', is only one more with less suport and feature.
Agree.
About reason #2, in our company we already updated our tests (thousands) to use async/await two years ago, just to be prepared when the upgrade comes.
We had the whole team working on that and it took us like 3 days to get the whole framework updated. Not a big deal, to be honest.
The protractor upgrade didn't arrive yet, true, but our code is much more readable and maintainable now 😍
Maintaining your tests must be part of your work IMO.
Thanks for the awesome information!!
What would you recommend as a substitute of Protractor.
Do you think we will still be able to run tests using Protractor 5.4.2 with future browser versions?
I assume - yes, Protractor will work, as Selenium team support legacy implementations. However, new features or protocol extensions won't be available. Anyway, don't blame yourself if you already use it. No need to worry. But it's not a great idea to choose Protractor for the next project.
I recommend Cypress, with him is possible to do E2E and Unit tests.
Sure, totally possible.
Protractor is maintained by Google and supports typescript
Just because they haven't updated it in a while doesn't mean still not the best framework for automation. Even better than selenium java.
Well, that's a myth. There is only one person working in spare time on this huge project. It was maintained by Google but not now.
If they won't change their policy on maintaining it won't be the best framework. I'm just rising awareness of that problem.
There are more alternatives than just Java. I hope you can find time to investigate more tools for testing so you could see Protractor is not the best at the market.
BTW CodeceptJS should not be considered as alternative to Protractor, but rather a testing framework that leverages this powerful library. So maybe webdriver.io could be an alternative but don't see anything better tgan protractor.
I just checked if protractor is the official e2e test tool, and looks like it is, speaking of Angular 10. I trust Angular team, if they are still using this tool probably there are good reasons for keeping it.
Honestly I added this comment because I don't like that a project quality is judged by the its number of releases. As others said, a major version introduces breaking changes, so it can be backwards compatible but it doesn't have to. It's up to the project team to merge the most important bug fixes on older major versions, but again they're not obliged to.
Also don't consider the number of open issues as an indicator of quality: sometimes people is just not using the tool correctly, or they are looking for tips on how to do something. The fact is that Angular is very popular, and Protractor is its official e2e test tool, so you can easily imagine why many people is using the repository issue board to ask things that are not bug related.
If I was you, in order to complete this article and make it more "credible", I would add at least a good alternative to it, and for alternative I mean something that has Tons of reasons to justify the migration from an official tool to one unofficial!
Cheers ;)
I feel sad for people who took this article seriously, now the library is maintained by angular, it's being developed actively, await made the life much easier and cleaner, await removed the complexity of the framework, page object model is the slogan for any automation project
Such a nonsense to be honest in my opinion... Yes, sooner or later Protractor may be a bad choice, but why I disagree to the mentioned as of today:
Don't get me wrong, the practice shows that those who don't make transition to newer technologies timely, lose their marketability. But that's not about Protractor in 2020
I came here from github.com/wswebcreation/protracto...
As we are actively using the above plugin with Protractor for testing.
I do not agree with every point you made against Protractor, however, the other frameworks mentioned is not solid as such and new to the market as well.
With recent upgrades from protractor, I believe it is stable. If there are more contributors to protractor itself, we could make it stronger as a framework.
It looks as though Protractor v6 isn't happening and the project is jumping straight to v7. The v6 packages on NPM have been marked as deprecated. Just FYI, not that it changes anything you've written, but I thought it was an interesting move on their part.
Yes, thank you! The post is very provocative but still true.
Even they jumped to 7 they didn't introduce anything huge in codebase, as the codebase is still a big mess. So project still faces stagnation
Just for someone who will read this article in 2021
TLDR
The Angular team plans to end development of Protractor at the end of 2022 (in conjunction with Angular v15)
github.com/angular/protractor/issu...
One more feature why we not use protractor;
Re-run only Failed test cases.(not supported by protractor)
Definite alternatives to Protractor are
All the above other than WebDriverIO are not based on Selenium which is a good thing.
BTW, to answer some pointers raised in the article against Cypress
iframes: This article explains how to work with iframes cypress.io/blog/2020/02/12/working...
file uploads: How to work with file upload with Cypress github.com/cypress-io/cypress-exam...
native events: Yes this is a big issue which they are actively working on github.com/cypress-io/cypress/issu...
any other browser except Chrome: They have recently started supporting firefox docs.cypress.io/guides/guides/laun...
xpath: Cypress has this beautiful concept called plugins and with that it's possible to extend the capabilities of cypress, one such example is using external node module for working with xpath, I personally used this and it works well npmjs.com/package/cypress-xpath
multiple windows and tabs: It's true that Cypress doesn't support multi tab and multi window but they have given reasons for not supporting that, which to me makes sense. We shouldn't be testing the browser features instead the application feature. Also, multi tab and multi browser scenarios are quite brittle. These are one of those flaky tests that has plauged the testing community for so long. Time to take these tests out of the test suite.
testing sites you don't control: Honestly, didn't get this point
page objects: As Page Objects is only a concept and not language/framework specific, ideally we should be able to use with almost any testing tool/framework. But then there are alternatives to Page Objects like SerenityJs's Screenplay Pattern, again PO Pattern makes things more complex. Cypress has a better way to handle with Custom cypress.io/blog/2019/01/03/stop-us...
Also, Cypress is ever evolving and they are going places to reach audience and gather feedback. Looks to me they are truly on their mission to provide a better alternative to Selenium.