DEV Community

sarvsav
sarvsav

Posted on

Day004 - Random posts under TIL

Topics:

  1. Question: How to write better tests?

1. Question: How to write better tests?
Not much for today. Posted the below question on reddit.

What if I write unit test or system test in wrong pattern, will it lead to bad codebase too? Learning how to write good tests is also a skill, and it takes time to learn that skill. However, if I need to follow deadlines, I cann't spend much time in learning test skill, so I may write bad pattern while writing test. Will it lead it to double efforts in the future as the code base is also built around that test. Or what is the best way to start a project. For example, chicago vs london unit testing to understand which one is good choice, I need time to learn it. Most of the tests are end up in TDD with just 2 cases to show that I have 100% coverage, though I am not sure if it is true or not. Kindly share your advice on how can I improve it as not testing even writing optimize test is also required.

Top comments (0)