Protractor

Protractor

DevOps / Build, Test, Deploy / Javascript Testing Framework
Needs advice
on
CypressCypress
and
NightwatchjsNightwatchjs

We are planning to switch to an automation tool as Protractor is not going to provide support.

Why does everyone prefer Cypress which is a paid tool if we have Nightwatchjs? Can someone help me understand which one to prefer with their advantages and disadvantages?

READ MORE
3 upvotes·20.2K views
Replies (2)
Strategic Success at Cypress.io·
Recommends
on
Cypress

This is a great question!

Cypress is an overall testing solution of which e2e is a subset of its capabilities. The Cypress App is free to use and completely open source it was built with a developer experience first focus and it was geared toward solving the problem of web application testing by running in the browser's process.

I often encounter in my work with organizations adopting new tools a framing of why should I choose X tool over Y tool. This is a great place to start thinking, but what I like to challenge organizations I work with is to take one step back and ask, " Am I looking for a tool or a solution?"

A tool works in conjunction with other tools to achieve some mostly singular purpose; unit testing, API testing, integration testing, component testing, e2e testing, contract testing, analytics, etc. Tools also require learning a new syntax, continual training, implementation time, on-going maintenance and more a conjunction of other tools to accomplish an overall solution, in this case effectively and confidently testing.

Cypress is an overall testing solution of which there are two core product areas (right now), The Cypress App & Dashboard. The Cypress App is a completely free open source project that can test anything that runs in the browser.

Features of Cypress App - absolutely free - #1 tool recommended by Angular and Protractor team for migrating to after the deprecation of Protractor - automatic retries and baked in tests for actionability on elements - running in the browser's process - can test the following; front end unit, component, integration, api, e2e testing - can test multi-origin (currently in beta) - amazing docs - syntax is straight forward - no complex configs or setup - thriving and vibrant community - bi-weekly release cycle, so always iterating and improving - integrates with the Dashboard to show information from your runs in the cloud

The Cypress Dashboard is a paid subscription service that well to put it briefly makes testing even better with a focus on;

  • speeding up your runs through parallelization
  • unlocking an enhanced debugging workflow
  • providing you analytics that help you better understand the ongoing health of your test suite
  • handling all of your Cypress testing types in one place
  • addressing flake through our flake analysis and mitigation workflows
  • integrates all CI providers, Slack, Jira, and the top source control management tools to report directly on your runs
  • and a lot more

I hope this was helpful for you and the team, but don't take my word for it come engage in our community forums on Discord and ask around.

https://discord.gg/RFyjB34h

Oh, and I almost forgot, our DX team built a free to use Protractor to Cypress migration tool that will help you swap your tests over to Cypress. It's a really great tool when you're getting started to learn more about Cypress syntax. Anything with a lot of complex logic may not migrate appropriately, but it should give you a running start!

https://migrator.cypress.io/

READ MORE
6 upvotes·204 views
Sr. QA Engineer at Exzeo Software Pvt Ltd·
Recommends
on
Cypress

Cypress tests are always fast in execution as compared to tools that use selenium. Cypress also operates at the network layer so you don't need to install any external libraries. Cypress tests are easy to set up and you don't need any browser drivers to run cypress tests. Any browser that is installed, you can run cypress tests on those browsers. It is very easy to write locators and tests in cypress as compared to any other tool. The only drawback of cypress is it doesn't handle subdomain change and multiple tabs. But there are workaround for subdomain change that one can use

READ MORE
4 upvotes·226 views
Tech Lead at KIOT Innovations·
Needs advice
on
CypressCypress
and
ProtractorProtractor
in

Protractor or Cypress for ionic-angular?

We have a huge ionic-angular app with almost 100 pages and 10+ injectables. There are no tests written yet. Before we start, we need some suggestions about the framework. Would you suggest Cypress or Angular's Protractor with Jasmine / Karma for a heavy ionic app with Angular?

READ MORE
6 upvotes·865.3K views
Replies (2)

I work with two angular applications, one of them i already created a framework based on protractor. The other one i think using cypress instead of the protractor, the reason for that is the protrator will be deprecated at the end of the year. That reason for me is enough to select cypress as the better approach once it has a huge and increasing community and its downsides have been solved with time.

READ MORE
4 upvotes·4 comments·3.2K views
Sai Chaitanya Mankala
Sai Chaitanya Mankala
·
August 3rd 2021 at 12:47PM

Makes sense, thank you for your suggestion :)

·
Reply
Amir Rustamzadeh
Amir Rustamzadeh
·
August 3rd 2021 at 2:05PM

Hi Sai, Amir from the Cypress team here.

Angular team recently announced the deprecation of Protractor, so it's not a viable option for new projects or projects that have no tests.

Cypress can definitely help your team test your Ionic app, regardless of the size of the app. If you are using the Angular CLI, you can easily get started with the Cypress Angular Schematic: https://www.npmjs.com/package/@cypress/schematic

·
Reply
Tarunam Nair
Tarunam Nair
·
October 18th 2021 at 5:32AM

Please check Cypress limitations before investing in it. Look like cypress can't handle switching to multiple TABs, cross browser testing and switching to different domains.

·
Reply
Satish Javalekar
Satish Javalekar
·
January 6th 2022 at 7:34AM

cross-browser testing against 30+ browsers is possible with Cypress Automate through Browserstack

https://www.browserstack.com/automate/cypress?ref=guide-cypress-vs-selenium-floating-banner

https://www.browserstack.com/docs/automate/cypress.

Agree handling multiple tabs is not supported but there are work arounds

https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/testing-dom__tab-handling-links/cypress/integration/tab_handling_anchor_links_spec.js

Trade offs are clearly mentioned under cypress documentation https://docs.cypress.io/guides/references/trade-offs#Multiple-tabs

Hope this helps.

·
Reply
Software Engineer at EPAM Systems·
Recommends
on
Playwright
in

For end-2-end tests it's great - fast, working with or without headed mode, can do dom snapshots instead of only screenshots.

READ MORE
1 upvote·351 views
Automation Engineer at Tipalti·
Needs advice
on
PuppeteerPuppeteer
and
WebdriverIOWebdriverIO

Currently, we are using Protractor in our project. Since Protractor isn't updated anymore, we are looking for a new tool. The strongest suggestions are WebdriverIO or Puppeteer. Please help me figure out what tool would make the transition fastest and easiest. Please note that Protractor uses its own locator system, and we want the switch to be as simple as possible. Thank you!

READ MORE
7 upvotes·2M views
Replies (2)

Moving away from Protractor, I would suggest giving Playwright (https://playwright.dev) a quick try, as it seems to have more momentum than Puppeteer at the moment. WebDriverIO is a more mature, higher-level tool, which can also use Puppeteer under the hood, and offers interesting built-in functionality. Depending on the size of your framework, it might be easier to switch to either one of those. I would recommend writing down your key criteria for the decision, then running a short POC with both Playwright and WebDriverIO running against your target application.

READ MORE
3 upvotes·2K views

Hi Raziel, take a look at Playwright which is kind of the successor of Puppeteer, this is a new project backed up by Microsoft and developed by the same team that started Puppeteer a while ago. It works for all major browsers. Have been using it in a couple of projects and works great.

READ MORE
1 upvote·4.7K views