In the TDD approach, we are obligated to write unit test first and then write down the code, later run the test, repeat until the code/function pass the test. I believe by this approachment, the number of bugs will be reduced to minimum.
With the help of Selenium, we even can emulate submitting form in the Yii…
Now, let’s say in our development team, we have QA staff who do testing the application. Finding bug and errors. So the programmer code a module, give to the QA Staff to test, the QA staff check against to checklist which function must be passed, tell the programmer what functions haven’t passed yet, repeat until all the checklist is checked.
So, if the team has QA Staff to test the application, must the programmer still need to write the unit test? Or instead, they just straight to coding and let the QA staff do the checking?
Unit testing is generally a developer’s job since tester usually don’t know and don’t care about how it works inside. If overall result is OK, tester is happy. Unit tests are reducing such internal errors. Testers are covering complex and unusual things not covered by unit testing.
Most of the time a QA member is most likely to be a human being, so he/she can (and will) make mistakes.
With TDD you can reduce the number of bugs significantly, which your QA team don’t have to find and report (time consuming), so they’ll work faster, and your developer is gonna have more time to develop a new feature etc, instead of fixing bugs.
I think I’ve got the idea about writing PHPUnit versus QA staff. So as developer we must write the test of the module’s functionality, the very technical thing, try to sending extreme values to the function, give unusual value, to see how the function responses.
While for bigger coverage, such as the flow of the application, the display of the web, typo, etc must be done by QA staff. Correct?