We All Need Automated Tests (Rant.js)

Casey Morris
Oct 22, 2018 · 5 min read
Image for post
Image for post

Welcome to Rant.js, a new series I’m starting based on short, mostly opinions, on anything that interests me in the JavaScript world. These articles, while not entirely factual, may provide an interesting look into the day-to-day thought process of a JavaScript developer. These rants mostly stem from discussions with peers on Slack or GitHub. You can find the previous article here: JavaScript — Undefined vs. Null

My Opinion On Automated Tests

How Do You Know What To Test?

Business Critical

High Error Occurrence

Large Surface Area

Slightly Specific Examples

  1. Test Redux Actions for “Checkout Process” (Enzyme)
  2. Test User Flow for “Checkout Process” (Cypress)
  3. Test Redux Actions for “Cart Actions — Product Add/Remove” (Enzyme)
  4. Test User Flow for “Cart Actions — Product Add/Remove” (Cypress)
  5. Test Redux Actions for “User Login” (Enzyme) [has a different priority if this is required for purchase, this assumes guest checkout is possible]
  6. Test User Flow for “User Login” (Cypress)

This would prevent the most direct customer facing issues that would impact them from making a purchase. Any new tests can be added using the above criteria.

Is This All Really Worth It?

Let me explain a recent situation that really sold me on automated testing. I was already a staunch advocate, I didn’t think it was possible to sell me the concept any further.

Why Is Everything On Fire? 🔥

Where Did My Weekends Go?

Why was this happening? We have tons of automated test coverage that runs automatically within TravisCI, they were all passing, or so we thought…

Tests Weren’t Even Running

Back To Normal

This 2 week period while terrible to experience, validated to everyone the benefits of testing. Especially to those outside of the development team. The same people that were complaining about features not being released quickly were now demanding that testing be extended at the cost of frequent feature releases. Testing is now a concrete standard within the organization.

What We Learned

Feedback? Words of encouragement? 🎉


JavaScript news and opinion.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store