Using Unittest To Develop Basic Tests
Setting up and tearing down a test harness
Running test cases from the command line with increased verbosity
Running a subset of test case methods
Chaining together a suite of tests
Defining test suites inside the test module
Retooling old test code to run inside unittest
Breaking down obscure tests into simple ones
Testing corner cases by iteration
Running Automated Test Suites with Nose
Writing a nose extension to pick tests based on regular expressions
Writing a nose extension to generate a CSV report
Writing a project-level script that lets you run different test suites
Creating Testable Documentation with doctest
Running doctests from the command line
Coding a test harness for doctest
Printing out all your documentation including a status report
Testing corner cases by iteration
Updating the project-level script to run this chapter's doctests
Testing Customer Stories with Behavior Driven Development
Naming tests that sound like sentences and stories
Testing separate doctest documents
Writing a testable story with doctest
Writing a testable novel with doctest
Writing a testable story with Voidspace Mock and nose
Writing a testable story with mockito and nose
Writing a testable story with Lettuce
Using Should DSL to write succinct assertions with Lettuce
Updating the project-level script to run this chapter's BDD tests
High Level Customer Scenarios with Acceptance Testing
Testing the basics with Pyccuracy
Using Pyccuracy to verify web app security
Installing the Robot Framework
Creating a data-driven test suite with Robot
Writing a testable story with Robot
Tagging Robot tests and running a subset
Using Robot to verify web app security
Creating a project-level script to verify this chapter's acceptance tests
Integrating Automated Tests with Continuous Integration
Generating a continuous integration report for Jenkins using NoseXUnit
Configuring Jenkins to run Python tests upon commit
Configuring Jenkins to run Python tests when scheduled
Generating a CI report for TeamCity using teamcity-nose
Configuring TeamCity to run Python tests upon commit
Configuring TeamCity to run Python tests when scheduled
Measuring your Success with Test Coverage
Building a network management application
Installing and running coverage on your test suite
Generating an HTML report using coverage
Generating an XML report using coverage
Filtering out test noise from coverage
Letting Jenkins get nosy with coverage
Updating the project-level script to provide coverage reports
Smoke/Load Testing — Testing Major Parts
Defining a subset of test cases using import statements
Targeting end-to-end scenarios
Recording and playing back live data in real time
Recording and playing back live data as fast as possible
Automating your management demo
Good Test Habits for New and Legacy Systems
Something is better than nothing
Be willing to invest in test fixtures
If you aren't convinced on the value of testing, your team won't be either
Capturing a bug in an automated test
Separating algorithms from concurrency
Pause to refactor when test suite takes too long to run
Be willing to throw away an entire day of changes
Instead of shooting for 100 percent coverage, try to have a steady growth