In the enthusiasm of finding and preventing the defects upfront and avoiding a lengthy testing phase later in the cycle, some developers are encouraging the developer community about writing tests as they write code. While the intention of preventing silly mistakes and programming errors is much appreciated from a quality perspective, there is a danger in calling these code as “tests”. In this blog, let us look at why they should not be called as “tests” and look at some name options for them.
Subscribe to my YouTube channel
A test is an involved activity taking into consideration the current context and the state that the software is in. A test is done to assess what the software is doing. A test is to prove or disprove a hypothesis, whatever the hypothesis may be. A test typically takes several steps and the steps done depend on again the context and the state. As you can see, a test cannot be trivialized to be “written” as automated code while writing product code. As part of the testing process, some of the steps involved could be automated to reduce repetition and fatigue. So, it is incorrect to ask someone to “write tests” be it while developing the product code or for the automation involved in assisting the tests. To put it bluntly, you cannot write tests, because the steps in the test change based on the context.
Having said that, as I said earlier, it is important to prevent programming mistakes early so that they don’t end up as defects for the testing to find. Automation to check while developing product code definitely helps. Just that you cannot call it as “writing tests”. You could call it as “writing automated checks” or simply “writing checks”. A check could be a step in the test, or many steps could collectively form a check.
It is important to have this distinction in mind so that tests are not trivialized to checks and let people conclude that all tests can be automated and remove the testing effort after the product is developed. It simply cannot be and should not be done for the sake of quality and the end-user expectations.
For more on this topic and developing testing strategies for your organisation’s product(s), feel free to reach out to me.
Happy Testing!
Pingback: Cost Effectiveness In Testing - Venkat Ramakrishnan