Book Image

Ext JS Application Development Blueprints

Book Image

Ext JS Application Development Blueprints

Overview of this book

Table of Contents (18 chapters)
Ext JS Application Development Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Continuous coverage


You've learned how to use a couple of different testing tools in this chapter, but what about when to use these tools?

When it comes to code testing, there's a metric known as "code coverage" that tells us the percentage of our code that is covered by tests. The first thought of a passionate architect starting a new project is that everything should be covered with tests, tests everywhere!

Realistically, there are things that we just don't need to test; as always, we should take a pragmatic approach. Configuration of components probably doesn't need to be tested; we don't need to test the return values from third-party code libraries; there are many examples.

Having said that, code coverage is a useful way to make sure that a certain level of testing is maintained in a project. For example, we might wish to have 90 percent test coverage of our model code and only 50 percent coverage on our controllers, which contain more boilerplate that doesn't need to be tested. The exact...