What information should be included when reporting bugs

做為一個tester, 最重要的工作當然就是找到bug. 但是找到bug後, 要怎麼去report這個bug? Team System裏的 work item tracking可以提供一個簡單自動化的工具來report bug. 例如, 當實行一個unit test結果是failed時, 只要publish這個test然後在test result按右鍵執行Create Work Item, 就可以將這個failed的unit test 以bug的型式report到team system的work item tracking system.同時default的template裏, 就會包含以這個test為名的title, 還會將fail的原因和詳細資料填入comment中. 但通常developer可能會需要提供更多的資訊, 尤其是在黑箱測試時, 找到bug的步驟, 環境等都是很重要的資訊, 所以針對不同的需求, 可能需要customize team system中的bug form (customize 的方法請參考我之前的post, How to customize process template in team system, 做法類似), 以求bug form可以包含所有最基本的資訊幫助developer了解真正的問題所在, 也幫助其它的tester或team中的其它成員容易找到並追踪這個bug.例如以我們平常工作的bug form, 就至少多加了以下三種基本的fields.

1. How Found: 在執行什麼樣的test時發現這個bug? automation? manual? bug bash? 等. 這可以幫助manager或test lead了解執行test方法的優劣.

2.Environment: 測試環境有時很重要, 尤其在globalization的測試中, 某些bug只會在某些地區或語言設定下發生, 甚至有些bug只會在某些os中發生

3.Blocking: 這個bug有沒有block整個feature的testing. 有沒有break整個user scenario

另外一個好的bug需要包含的資訊還有精簡但清楚的找到bug的步驟, 一個好的標題等. 以下這個由VSTS Quality Tools team提供在他們blog上的說明, The Perfect Bug , 是一個很好的參考資料.