- Verify the input and output creating the defect.
- Replicate the defect in your development environment.
- Write a unit test that replicates the defect using the same input as the defect and desired output. (You may want to extend this to other permutations of the defect as well.)
- Verify the unit test breaks.
- Fix the code.
- Verify the unit test passes.
- Verify that the defect is resolved in your local development environment.
- Release to next environment (Prod/QA)
- Verify that the defect is resolved in the next environment.
- Repeat until defect is fixed for all users.
Do not try to skip steps in the process. You will miss something important. You will waste yours or other people's time. It's not worth it.
To me it's really all about Step 1...i mean, if you haven't entirely isolated the input (the output is usually how you know there is a defect), you're just looking for a needle in a haystack.
ReplyDeleteIf you really want to be efficient, steps 2,4, and 6-10 should be clocked regularly...if it takes you 10 minutes to see if a fix "worked", you're going to waste alot of time no matter how intelligently you approach the problem.
Totally agree on your points, I added them for completeness. I don't have my system setup to upload a content db daily (which I'll do now), we have continuous integration for automating the unit testing and we're working on getting continuous deploy (already have for 2 services) on all of our systems. that way, 6-10 happen automatically on check-in. My initial goal is 20 minutes for full testing. Deploy to prod in < 30 minutes.
ReplyDeleteMaybe I'll do a future post on automating testing and deploy.