---
title: "Discussion on \"The art of writing useful tests\" | Hashnode"
description: "Discussion on \"The art of writing useful tests\". Through my career in software, I've come across a broad range of attitudes and opinions towards testing code. The two\nextremes being that 'tests aren't worth writing because something is too complicated', or that\n'every single piece of code being che..."
url: "https://hashnode.com/posts/the-art-of-writing-useful-tests/5f6b0d59cbf0b22e6d444234"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [The art of writing useful tests](https://dglsparsons.hashnode.dev/the-art-of-writing-useful-tests?utm_source=hashnode&utm_medium=feed)

Through my career in software, I've come across a broad range of attitudes and opinions towards testing code. The two extremes being that 'tests aren't worth writing because something is too complicated', or that 'every single piece of code being che...

Sep 23, 2020 · 8 min read · dglsparsons.hashnode.dev  
Read the article

-   [#go](https://hashnode.com/tag/go)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Douglas Parsons](https://hashnode.com/@dglsparsons)

@dglsparsons · Sheffield, UK

  
[View profile](https://hashnode.com/@dglsparsons)

Full Stack Engineer @ Shamaazi | Formula1 fan | Keen skier | Cat lover

Lead Engineer @ Shamaazi • AWS • Go • React • Terraform • Blogging weekly on cool tech / helping others to code. Follow me on Twitter to keep up.

## Responses 1

Markdown supported · ⌘↵ to post

[Dinys Monvoisin](https://hashnode.com/@dinmon)

[Sep 27, 2020](https://hashnode.com/posts/the-art-of-writing-useful-tests/5f6b0d59cbf0b22e6d444234/comment/5f7023e80ba48d6624c91ce5)

In the apparent section, I believe that those books, tutorials are there for learning purpose, and that's why they use a simple example to explain every use cases. Also, those unit test can serve as documentation.

What about the question of the cost of writing unit test? Is it much more of a problem in businesses?

I found that the article lack of space.

[Douglas Parsons](https://hashnode.com/@dglsparsons)

[Oct 23, 2020](https://hashnode.com/posts/the-art-of-writing-useful-tests/5f6b0d59cbf0b22e6d444234/comment/5f7023e80ba48d6624c91ce5#reply-5f92e07e65ec1a6c2163b523)

Hey, thanks for the feedback. I'll bear the space in mind in future!

I agree that they are using a basic example to explain tests, I just think they don't explain when testing is appropriate.
