Loading
In this post, I present a checklist that you can use to assess the quality of your unit tests (regardless of the used language or unit testing framework).
The checklist is thereby divided into three parts. The Test Suite checklist contains questions that have to be answered once for the whole test suite that is assessed. The Test Class checklist contains questions that have to be answered once for each Test Class of your assessed Test Suite. The Test Case checklist contains questions that have to be answered once for each Test Case of your assessed Test Suite.
By comparing the answer to each question to the expected answer, you get a feeling for the quality of your unit tests, as well as open tasks to improve quality (towards the goal of correctly answering all questions for your testing project).
You can even quantify and compare quality to other projects, by adding up all of your negatively answered questions for a test project (eventually dividing it by the number of test cases).
Test Suite Checklist (answered for the whole Test Suite)
Test Class Checklist (Answered for each Test Class individually)
Test Case Checklist (Answered for each Test Case individually)
What do you think about this checklist?
Did you already try it out in your unit test projects?
Do you have suggestions for improvement?
Let me know in the comments section below.
Daniel Lehner is a PhD student at the Johannes Keppler University in Linz, Austria. His research focus is on traceability of software information between different stages in the development cycle. During his master studies in Business Informatics at the Vienna University of Technology, Daniel worked as a consultant in the area of software quality assurance.
Towards a new generation of test types
Paul StelzhammerWhen you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. Control your personal Cookie Services here.
Daniel Lehner