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:

  • If you want to use one set of tests and stubs when testing on the host system and another set when testing on the target device).
  • If you want team members to perform fast "sanity checks" on the developer workstation, then have C++test server run a comprehensive regression test on the entire code base each night.

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.
    • The test case location is specified in the Execution> General tab’s Test suite location patterns field.
    • The stub location is specified in the Execution> Symbols tab’s Use extra symbols from files found in field.

 

  • No labels