Emphasizing on writing tests

Reading time ~1 minute

Backstory

I had scribbled this blog last year. Somehow I forgot to publish. During this quarantine time with lot of retrospection, I knew what I was missing.

Emphasizing On Writing Tests

I am big fan of tests. Tests not only test your code but also tell others how your code works. (Disclaimer: Provided enough tests)

There is the famous TDD in agile. Writing failing tests before writing the code, which gives lot of clarity for implementation. It gives you confidence. Then there is BDD which let’s tech and non-tech users to write tests using common framework. “Given-when-then” formula is most common for BDD.Writing tests gives you confidence. You should write units tests, integration tests, test with mocks and all other useful tests.

Win situtation

Tests helps in code reviews, tests help in refactoring code. Tests helps to speed up new dependent features. Stable code base must have tests (IMHO). As architecture evolves we need to find ways on how we can improve writing tests. Tests for UI, tests for micro-services, monitoring tests, snapshot tests, selenium tests.

back to tests

Till next time.

Build your own ngrok in 4 easy steps

Show your localhost to the internet, the easy way. Continue reading

A puzzle for you today

Published on August 25, 2017