Member-only story

E2E Test Automation Anti-Pattern: node_modules and package.json or alike

It results from bringing “Developer Mindset and Practice” to E2E Test Automation.

Zhimin Zhan
6 min readDec 4, 2023

This is an article in the E2E Test Automation Anti-Pattern series.

Why do some software engineers create jokes about node_modules, like the one below?

A joke image about node_modules on DevHumor, credit: https://devhumor.com/tags/node_modules

Because they (JS engineers) don’t like it. One common pain is accidentally committing the node_modules folder into the Git repository and pushing it up!

https://twitter.com/SamsonChiemezie/status/1720363844277801184/photo/1
https://www.reddit.com/r/ProgrammerHumor/comments/18ibc9z/smallreactwebpagebignodemodules/

Of course, the solution is simple: add node_modules in the .gitignore file.

https://twitter.com/iamsouvik_b/status/1730975574481600636/photo/1

Like many JS developers/testers, I made this mistake too, more than once! In those moments, I often reflect on a line from my favourite movie, “Monsters Inc.”

It frustrates me when developing/maintaining E2E test scripts in JavaScript, as there is no such shenanigan (along with others) in Ruby. Today, I will talk about the annoying node_modules in the context of E2E Test Automation.

Table of Contents:
· What is Node_Modules?
·
You Don’t Need to Worry about this if you are using Ruby.
·
A Case Study of Executing a simple @playwright/test test script
·
Why package.json and node_modules are unnecessary for E2E Test Automation?
1. E2E Test Scripts Require a much smaller number of libraries
2. No need to be localized
3. The test automation libraries are generic and not specific to apps.
·
How was this

--

--

Zhimin Zhan
Zhimin Zhan

Written by Zhimin Zhan

Test automation & CT coach, author, speaker and award-winning software developer. Help teams succeed with Agile/DevOps by implementing real Continuous Testing.

Responses (1)

Write a response