What's Worse Than Coding Without Tests? Coding With Bad Tests.

What's Worse Than Coding Without Tests? Coding With Bad Tests.

The focus has been on test quantity/coverage without mentioning test quality. If tests are a developer's safety net, shouldn't they be treated like safety gear?

For a long time we've (and by "we" I mean the industry) harped on test coverage. We've sold each other the idea that tests are the safety net developers need to code without fear. Because if the tests pass, your changes must be good, and ready for production, right? Advocates of Test Driven Development even say you should write the tests before the code. But what happens when the tests are wrong? When they're buggy? When they don't test what you think they do, or worse don't test anything? In short, how do you test the tests?

So far, the industry focus has been on test quantity, i.e. coverage, without really talking about test quality. But the time to shift focus is coming. Because if tests really are a developer's safety net, then shouldn't they be treated like safety gear? And once you think of them as safety gear, it becomes obvious that they should be inspected on a regular basis. After all, firefighters inspect their gear after every fire, and climbers and acrobats inspect their gear before every use. 

So when's the last time you inspected a test? And by "inspected", I don't mean "ran". Running the tests is an inspection of your code, not the tests themselves. If you're like me, it was just before you committed the last change to it. If your commit got peer review, then you were lucky enough to get a second pair of eyes on that test. But after you committed the changes, I'm guessing it was entirely "out of sight, out of mind."

That's a real pity if you consider some of the things that can go wrong with a test. Just as much as developers are prone to copy-paste errors during coding, we're maybe even more so while writing tests.

static analysis static analysis tools test quality test

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Static Code Analysis: What It Is? How to Use It?

Static code analysis is a method of debugging by examining source code before a program is run. It's done by analyzing a set of code against a set (or multiple sets) of coding rules. Static code analysis and static analysis are often used interchangeably, along with source code analysis.

Top 10 Automation Testing Tools: 2020 Edition

The demand for delivering quality software faster — or “Quality at Speed” — requires organizations to search for solutions in Agile, continuous integration (CI), and DevOps methodologies. Test automation is an essential part of these aspects.

Top 10 Mobile Performance Testing Tools

After extensively researching, I’ve put together a list of top-rated mobile performance testing tools and provided an overview of each below. The shift from desktop to mobile started long ago, but COVID-19 has only accelerated it.

Mutation Testing Systems: Improving the Quality of Tests

See why mutation testing might be the answer for better quality tests and thus higher quality code.

In-house Tool for Performance Testing

This article analyzes a way to create a simple tool, which can serve data conditioning testing or performance testing of mobile, web, or desktop applications.