Exit Strategy for Cypress Testers
Another familiar situation for JavaScript Testers (PhantomJS → WebDriverIO → Protractor → TestCafe → Puppeteer → Cypress → ?)
A repost of my past article published on Medium in 2023.
In the preceding article titled “Cypress.io is Dying”, I gathered factual information and financial figures to substantiate this perspective. Based on the facts & information presented, it is evident that the collapse of Cypress.io (the company) is not merely a rumour but a matter of time. The question for many current ‘cypress testers’ may be thinking, “What shall I do?” Of course, these people don’t really care about Cypress.io or the Cypress product, they care about their next jobs.
In this article, I will share my suggestions (as always, feel free to ignore them). Some who read my prediction of Cypress nearly three years ago and followed my advice might find themselves in a good position.
Table of Contents:
· What are the options for current Cypress testers?
∘ 1. Do nothing, pretend not hearing anything.
∘ 2. Migrate to Playwright, like most
∘ 3. Migrate Cypress API Testing to Ruby API Testing
∘ 4. Upgrade to learn Selenium WebDriver to do real
· FAQ
What are the options for current Cypress testers?
For those working with Cypress now, before reading below, maybe it is a good time to pause and consider whether you want to do real end-to-end web test automation or continue to fake it. Real E2E test automation means running a whole suite of E2E (via UI) tests daily as regression testing.
Frankly, I am not judging here. Bring food back to family is an honour thing to do, fake (the majority) agile projects may prefer fake e2e test automation, and some management/tech leads might only want fake e2e test automation as they fear real (personally, I experienced quite a few). There is no shame in fulfilling the need, as long as don’t sabotage any real test automation efforts.
IMO, doing real or fake e2e test automation makes no difference in terms of securing a job (that’s the sad reality). It boils down to an individual’s personal preference.
1. Do nothing, pretend not hearing anything.
After Cypress.io is gone, you may still be able to manage to execute your test suite with https://sorry-cypress.dev/. However, by common sense, it won’t last long if Cypress.io does go under. Without a motivated support team, issues will arise quickly or have already happened.
You probably see more like this. Remember, a few posts (see in ‘Cypress.io is dying’) mentioned: “Cypress is flaky or limited”. That’s the consequence of betting on a proprietary test framework.
Of course, before the final announcement, a miracle may happen. Maybe another angel investor will come to the rescue, and Cypress will grow even stronger and wipe out Microsoft’s Playwright. (Selenium will always be around because it is based on a W3C standard.)
My advice: there is a mounting risk that Cypress will be gone forever. If you are stressed, check out this classic book: “Who moved my cheese?”
2. Migrate to Playwright, like most
It may be a safe bet, as many will do (or have already done that). There is even a tool, “Cypress to Playwright Converter”.
However, given the quick cycling of JS automation frameworks (a sign of fake test automation, as a comparison, I have been doing successful E2E testing with raw Selenium WebDriver + RSpec since 2011, completely free), you might need to get yourself ready for the next move. By the way, your time on Cypress is not helping your career. Young testers who missed Cypress or were wise enough to have skipped it are ahead.
Why not do real test automation with Selenium WebDriver for a change?
My advice: Maybe it is a good time to review how you got yourself into this situation.
3. Migrate Cypress API Testing to Ruby API Testing
Check out my other article, Cypress API Testing Makes No Sense, which also includes a link to a case study by my daughter: Migrate Cypress API Tests to Ruby.
Also, don’t mention the embarrassing “Cypress Component Testing” to anyone.
4. Upgrade to learn Selenium WebDriver to do real
I know the first reaction of many Cypress testers, “Going Back to Selenium WebDriver, no way”. The fact: Selenium is still popular and Cypress, the so-called “Selenium killer”, is dying. Shouldn’t that wake up some people?
Update (2024–01–22): two recent independent surveys show that Selenium WebDriver is still the choice for web test automation, by a huge margin.
Do real test automation with Selenium WebDriver: run your test suite (all tests) daily as regression testing, like how Facebook used Selenium WebDriver to enable “release twice a day”.
“Facebook is released twice a day, and keeping up this pace is at the heart of our culture. With this release pace, automated testing with Selenium is crucial to making sure everything works before being released.” — DAMIEN SERENI, Engineering Director at Facebook, at Selenium 2013 conference
If you are a member of a successful testing team like that, you shall have no worries about your job or career, right?
Most of the issues you had with Selenium might come to the followings:
Selenium implementation in JavaScript is not good.
I agree, Selenium JS is not good, it is mainly because of the language. That’s why I recommend Selenium Ruby. I might be more qualified than most to say this.
You did not find the right tool to use
Some Cypress features you might like as a tool, not as a framework. Selenium Tools can be more effective, like TestWise or the upcoming JetBrain’s Aqua.Lack of skills and understanding of Selenium
Selenium is not flaky at all, it is the most reliable web automation framework for a simple reason: W3C standard. Think about the trust of Selenium from Facebook, then think about the team’s trust in your Cypress test suite. Compared to Selenium, from my experience rescuing failed Cypress test automation attempts, Cypress is at least 5X more flaky, moreover, it has many limitations. What you heard was just brain-washing marketing, i.e., evil mudslingings against Selenium, for commercial purposes.
For more check out Three Big Fat Lies about Selenium WebDriver: “Not Reliable”, “Hard to Learn”, and “No Enterprise-Level Support”Never worked on a real Agile Project, in which a large suite (>200 user story level) of end-to-end UI tests suite running multiple times a day.
Many automated testers who haven’t reached that level won’t appreciate the greatness of Selenium WebDriver.
The failure of Cypress (looks very likely) means what the marketing Cypress did was mostly wrong or at least questionable, for example, the below Cypress marketing statement is wrong.
Ruby is the best scripting language for test automation and Selenium WebDriver is the best web test automation framework. After all, “Ruby on Rails and Ruby are the most in-demand skills”, according to Hired’s 2023 State of Software Engineers Report.
My daughter implemented good test automation (in both Selenium WebDriver and Playwright) at her first intern job. In this large telecom company, all her colleagues have never witnessed such high efficiency in web test automation, let alone by a 20-year-old new intern (implemented in days and run daily, providing useful feedback). The secret: she implemented a test case in Selenium WebDriver + RSpec first in TestWise, then converted it to Playwright. Both suites were run daily in a free & open-source BuildWise CT server. Check out this story, An IT Graduate’s frustration with a Fake ‘Senior Test Automation Engineer’.
FAQ
“What shall I do with my existing test scripts?”
The short answer for most is: Dump them.
Based on several Cypress rescue missions I did, if my guess is right, you don’t have many reliable, working, well-written test scripts anyway. 25 or 50? I have never seen a case of more than 50 reliable working cypress e2e tests. Here, I mean useful test scripts, not counting broken ones.
It is easy and very quick to write them from scratch if using raw Selenium + RSpec. It typically took me 2 to 3 days to rewrite failed/bad Cypress test suite (<50 Cypress tests, typically 2–3 month work by 2 Cypress testers) in good raw Selenium WebDriver + RSpec test scripts, and got them running well in a BuildWise CT server.
2. “I worked on Cypress for the last two years, any tips for Résumé or Interview to cover it or light it up?”
If you have read my article “Why Cypress Sucks for Real Test Automation?” 2.5 years ago (2021–01–28) and followed my advice, you would be in a comfortable position. Many doubted my judgement then, when Cypress was hot. Will you follow my advice this time? (Frankly, I don’t care. The primary motive of my writing is for my daughter)
Back to your question, honesty is an important attribute of good software testers. Yes, your Cypress experience does not look good, but it happened and was unchangeable. There are many ones like you, though. But if you do make up your mind to learn real web test automation with Selenium, it will shine.
Check out How to Learn Web Test Automation in a Matter of Hours?
3. Any Job-Seeking advice?
Don’t mention “Cypress API Testing” and “Cypress Component Testing” to anyone, as they are clear signs of not understanding E2E test automation at all. Check the links to know more.
Learn Ruby, the best scripting language for end-to-end test automation. Talking about job-seeking, i.e., you want to get the interviews, right? According to Hired’s 2023 State of Software Engineers Report, “Ruby on Rails and Ruby are the top two most in-demand skills”.
Check out my tip: “My secret of near 100% interview success in Test Automation Engineer roles”.
4. Any other practical advice?
If you have ‘Cypress Ambassador’ in your LinkedIn profile, remove it, as it is (or soon will be) a badge of failure in test automation.
Related reading:
My eBooks:
- Practical Web Test Automation with Selenium WebDriver
- Practical Continuous Testing: make Agile/DevOps real
- API Testing Recipes in RubyHow do I Start Test Automation on Day 1 of Onboarding a Software Project?
One Simple Test Automation Scenario Interview Question that Most Candidates Failed
Practical Advice for Hiring a Junior Test Automation Engineer
Comments on the claims of “7 ways Cypress is different”. All False, Wrong or Lie
Test Creation Only Accounts for ~10% of Web Test Automation Efforts
Set up, Develop Automated UI tests and Run them in a CT server on your First day at work