Book Image

Learning Yii Testing

Book Image

Learning Yii Testing

Overview of this book

Table of Contents (16 chapters)
Learning Yii Testing
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Improving the quality of your tests


Since the beginning of programming and, in particular, testing, many programmers started questioning themselves on what it means to write good tests, or in other words, how do I know that the test I have written is good? What are the metrics for this?

It's definitely not a question of personal preference or skill.

One of the first methods that was created for analyzing the quality of the tests was called code coverage. From a wider perspective, code coverage measures how much of the code is covered by the tests. There is a correlation between software bugs and the test code coverage, where the software with more code coverage has fewer bugs, although the tests won't remove the possibility of bugs being introduced, for instance, as a manifestation of complex interactions between modules or unexpected inputs and corner cases. This is why you need to be careful when planning and designing your tests, and you need to take into consideration that this won't remove...