If you want to use different test cases and/or stubs for different testing contexts, you can create a different set of test cases and/or stubs for each testing context, then create a Test Configuration that uses each set of test cases and/or stubs. This is helpful in a number of situations; for example:

Test Driven Development (TDD) Tip

Typically, teams following TDD have Test Configurations for the following scenarios:

  • A "sandbox" test scenario for tests to run before checking in code. These tests should take 20 minutes or less to execute.
  • A "continuous integration" test scenario for executing a slightly larger set of tests. These tests may take over an hour to run.
  • An "overnight testing" test scenario for executing all available tests.

In this case, you can set up Test Configuration with nested inclusion: for instance, the sandbox configuration will execute only the tests in dir1, the "continuous integration" configuration will execute tests in dir1 and dir2, then the "overnight testing" configuration will execute tests in dir1, dir2, and dir3.

If you want to use different tests and/or stubs for different contexts:

  1. Store each set of test cases and stubs in a separate directory.
  2. Create one Test Configuration for each testing context, and configure it to use the appropriate set of test cases and stubs for the given context.