Chapter 24Test Organization Patterns

Patterns in This Chapter

Named Test Suite 592

Test Code Reuse

      Test Utility Method 599

      Parameterized Test 607

Testcase Class Structure

      Testcase Class per Class 617

      Testcase Class per Feature 624

      Testcase Class per Fixture 631

Utility Method Location

      Testcase Superclass 638

      Test Helper 643

Named Test Suite

How do we run the tests when we have arbitrary groups of tests to run?

We define a test suite, suitably named, that contains a set of tests that we wish to be able to run as a group.

image

When we have a large number of tests, we need to organize them in a systematic way. ...

Get xUnit Test Patterns: Refactoring Test Code now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.