Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part 2: Core development techniques > Agile testing: where dynamic typing shine...

7. Agile testing: where dynamic typing shines

This chapter covers
  • The Python unittest module

  • Creating a test framework

  • Mock objects

  • Testing techniques: monkey patching and dependency injection

  • Functional testing


Testing is an increasingly important part of software development. Automated test suites allow you to easily include testing as part of your development process, rather than as a separate, time-consuming, and expensive manual process. The alternative is letting your customers find the bugs for you. Testing isn’t only about finding bugs early, though; writing code in a testable way encourages the writing of modular and loosely coupled code—which means better code. Additionally, when adding new features or refactoring, your tests can warn you about what other parts of your code you’ve broken. Fortunately, testing is an area where dynamic languages particularly shine.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial