“Why we need unittest? it wastes time”
Why we need unittest, because we need good code quality.
1) The issue comes from ProjectA, and changes in our project.
And AAA told me why it happens and debug with project,
but we can’t repeat this step in every code change.
2) Which files are affected, how to duplicate the issue more simple more easy?
The unittest of ProjectAutotest is most easy way to get it.
3) When we fix the issue for ProjectA, for ProjectB,
it maybe affects our projects or others in same time. How could we know the change good or bad?
Whether this change affect other defects?
It is just my suggestion, but if you want to keep the code quality of our project,
Following steps will be good way to do, and
I have mentored BBB, CCC to follow the rule, it is not difficult.
Step1) duplicate the issue with Defect description.
Step2) convert the issue to ProjectAutoTest testcase. There must be one or two files.
There must be one or more interface function are called.
There have incorrect result or no output.
Step3) run your new adding testcase, it should be able to duplicate the issue too.
If some incorrect result is output, the incorrect result should same as Defect issue too.
Step4) Fix the bug. Find the root cause.
Step5) Change the code, and try with the testcase in ProjectAutoTest.
It should get correct result.
Step6) Test with all testcases in ProjectAutoTest, results should be correct too.
Step7) Test with Defect duplication steps. It should be correct too.
Step8) Check in the code, and change Defect state.
!!! Note: the testcase in ProjectAutoTest should be checked in too.
The testcase must be maintained same as source code, and consider the testcase as same importance too.
For the code review, it should have changed code, and new testcase in same time.