Chapter 5. Testing Your Application

In this chapter, we will cover:

  • Setting up the testing environment
  • Writing and running unit tests
  • Using fixtures
  • Testing the application with functional tests
  • Generating code coverage reports

Introduction

In a small application, the value of testing can be unnoticeable. In large applications it is different. When an application grows and you start modifying your code, it becomes difficult not to break anything else relying on it. Even if you hire a team of professional testers, you are slowing the development a lot. However, automated testing can partially solve this problem.

Another application of automated testing is Test-driven Development (TDD). The idea is simple: when you know how a component will work, write down your requirements in the form of an automated test prior to implementing a component. This way in the end, you will know if your component works as expected and you will not have to write tests later.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.190.93