Joseph Jung


Selenium… polishing crap or gold?

We all have heard that Selenium QA tests are helpful, in fact they are suppose to be of the highest business value of any type of testing. But, They feel so dirty. Why is that?

Let’s take a look:

1. One we all know already: Selenium is flakey! Random failures and edge-cases galore… 
2. It’s hard to get test data setup (especially if you’re in front-end)
3. It’s hard to teardown the test data as well.
5. To debug, you gotta restart *ALL* the way over from the beginning and beg to the Selenium gods that this time it will pass.
4. The code you are writing will break or become obsolete when the site changes.
5. For full coverage, you have to run your tests against 50 different browsers for hours and watch half miserably fail because of Selenium edge cases.

Now that my gripe session is over, one question remains… Does the value justify the pain?

Your boss will say “YES!” emphatically… and why is that? Because QA tests are insanely valuable to a business whether we like it or not. Here is why:

They test the whole shebang.

Think about it, one tiny selenium test of someone logging in to an application hits:

1. Html/CSS
2. JavaScript
2. Server code
2. Business rules
3. Database
4. Caching layers
5. Cookies/session
5. A specific browser

That’s a lot for one test. try to match that with a unit or JMeter test…

Helps scaling fast

We all have seen sphagetti code. For example, I’ve seen one single javascript file running on 50 different template pages producing literally 1000s of pages for a site generating millions in revenue a day. That file was a train-wreck, but essential to the business.

Scratch unit tests… scratch JMeter… the only solution was QA Selenium tests. We could slowly chip away at fixing the solution while knowing we weren’t losing the company in the process due to regressions.

Developers (especially new ones) feel safe

Switching php6 to php7 and feel extremely nervous that there’ll be weird edge-cases? Only if you don’t have tests…

Selenium needs a new makeover:

What do we need to do differently?

  • To start, we need a good combination of generating/configuring/writing tests to get things done faster.
  • We need tools managing the scale of testing suites.
  • We need teams to work together, from the back to the front-end.
  • We need professionally generated code that avoids flakey tests.

I’ve decided to make these things happen because there isn’t a solution. Check it out at

Hacker Noon is how hackers start their afternoons. We’re a part of the @AMIfamily. We are now accepting submissions and happy to discuss advertising & sponsorship opportunities.
To learn more, read our about page, like/message us on Facebook, or simply, tweet/DM @HackerNoon.
If you enjoyed this story, we recommend reading our latest tech stories and trending tech stories. Until next time, don’t take the realities of the world for granted!

More by Joseph Jung

Topics of interest

More Related Stories