DEV Community

Discussion on: 5 reasons you should not use Protractor in 2020

Collapse
 
paulogoncalvesr profile image
Paulo Gonçalves • Edited

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:

//protractor.conf.js
module.exports.config = {
  specs: ['src/spec/*.spec.js'],
};

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?

Suggestion: Learn about protractor-helper to create robust and flakiness free tests.

Note: Webdriverio and codeceptjs can't be considered a 'modern framework', is only one more with less suport and feature.

Collapse
 
jsunaina1 profile image
jsunaina

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?

Collapse
 
davert profile image
davert

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.

Collapse
 
paulogoncalvesr profile image
Paulo Gonçalves

I recommend Cypress, with him is possible to do E2E and Unit tests.

Do you think we will still be able to run tests using Protractor 5.4.2 with future browser versions?

Sure, totally possible.

Collapse
 
warioneila86 profile image
Mario

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.