- Identify or create a Test Configuration with your preferred test generation settings.
- For a description of preconfigured Test Configurations, see Built-in Test Configurations.
- For details on how to create a custom Test Configuration, see the Configuring Test Configurations and Rules for Policies. Details on C++test-specific options are available at Configuring Test Configurations.
- Run the Test Configuration
Tip - Generating Tests from the Test Case Explorer
You can generate tests for a project directly from the Test Case Explorer (which can be opened by choosing Parasoft> Show View> Test Case Explorer). Just right-click the project node in the Test Case Explorer, then choose the desired test generation Test Configuration from the Test History or Test Using shortcut menu.
For details about the Test Case Explorer, see Exploring the C++test UI.
- Review the generated test cases.
- For details, seeReviewing Automatically-Generated Test Cases.
- (Optional) Fine-tune test generation settings as needed.
- For details, seeGeneration Tab Settings : - Defining How Test Cases are Generated.
If the Create one test suite per function option is selected, a test suite generated for the sample ATM project (included in the examples directory) would look like this:
After selecting one of these options, you can customize the pattern as needed (for instance, to generate tests into the source location). You can use the following variables when you are customizing the pattern: