Component test preferences

Use the component test preferences to specify settings for the component test feature.

Component Test

Use this page to access general preferences for the component test feature.

Displays status after unsuccessful test scope analysis

Select this option to display an alert whenever the Create Component Test wizard is unable to calculate static metrics for any of the files in the scope of the test project. By default, this option is selected.

Keep temporary run project after test execution

By default, when you run a component test, a hidden temporary project is created in your workspace and deleted at the end of the execution. Select this option to keep the temporary project in your workspace after execution.

Advanced Options

Use this page to access advanced options for the component test feature. Only change these settings if you are experiencing problems with the default settings.

Code Generation

Change the prefix for generated variables if the component under test uses variables with the same prefix.

Statements

By default, the test data table ignores variables that are contained within if, for, while, do, synch, assert, or switch statements. Select the corresponding option to enable the use of test data contained in those statements.

Data Tables

Use this page to change the appearance of the test and stub data tables, the test data comparator, and the statics metrics table in the Create Component Test wizard.

Data table styles

Use this list to select the type of cell for which you want to change the appearance. Test data table styles also apply to stub data tables.

Style preview

Use this field to provide a preview of the appearance of the selected cell type.

Set Font Type

Click this button to change the font used in the selected cell type.

Set Foreground

Click this button to change the text color used in the selected cell type.

Set Background

Click this button to change the background color used in the selected cell type.

Test Generation

Use this page to change the way component tests and stubs are generated.

Test

Set preferences for component test generation.

Test name suffix

Use this option to change the suffix of generated test suites. By default, test suites are created with the suffix "Test" appended to the name of the component under test. If the test suite is based on several components, then only the suffix is used to name the test suite.

Default test package name

Use this option to change the name of the default package for generated component tests. By default, the test package name is "test".

Generate the test in the same package as the component under test

Select this option to generate the component test in the same package as the component under test. By default, component tests are generated in a dedicated test package.

Web service runtime Java proxy generation

For Web service component tests, use this option to specify the type of application server on which the Web service under test is running. By default, this is set to IBM WebSphere.

Stub

Set stub generation preferences.

Generate stub for private methods

By default, private methods are not generated in stubs. Select this option to generate stub methods for any private methods found in the stubbed component.