Explore
Module 1 · Part 1 of 12 · Free preview

Part 1

Part 130 min · narrated · preview

Written summary

  • Chapter 1: The $40,000 Mistake--–- In 2019, I cost my company forty thousand dollars.
  • "We have fifty regression tests for the login page,"
  • I was proud of my work.
Read along — the full text

Chapter 1: The $40,000 Mistake--–- In 2019, I cost my company forty thousand dollars. Not through fraud, not through negligence, not through a security breach. I cost them forty thousand dollars because I automated the wrong thing, in the wrong way, and I celebrated my work for two full weeks before anyone realized what I had done.The timeline went like this: I was six months into my first dedicated automation role, hired specifically because I had taught myself Selenium on nights and weekends while working as a manual tester. My manager, a busy woman named Carla who managed seventeen people and barely had time for one-on-ones, gave me a simple directive.

"We have fifty regression tests for the login page," she said. "They're all manual. The team spends four hours every sprint running them. Automate them, and you're a hero."I was twenty-four years old, eager to prove myself, and convinced that automation was simply the act of translating manual steps into code. I opened Eclipse, created a new Maven project, and began writing. I found the login page, identified the username field by its absolute XPath (/html/body/div[2]/form/input[1]), and wrote a driver.findElement(By.xpath(that monstrosity)).sendKeys("testuser"). I found the password field. I found the submit button. I wrote assertions that checked for a welcome message after login.It took me two weeks to automate all fifty test cases.

I was proud of my work. The tests ran in twenty minutes instead of four hours. Carla was impressed. The manual testers were relieved. I received a shout-out in the weekly all-hands meeting. I felt like a genius.Then the developers released a new feature.They added a promotional banner to the login page. Just a small div at the top of the page, announcing a holiday sale. The banner pushed everything down by forty pixels. My absolute XPath locators, which relied on the username field being the first input in the third div of the second form, suddenly pointed to empty space. Forty-seven of my fifty tests failed. Not because the login functionality was broken.

Keep reading — free

Sign in with your SamEnrico account to read the whole of lesson 1.

Sign in