Creating a DataStage test case
You can create Unit tests for DataStage® flows by using the DataStage user interface.
When you create a test case, DataStage performs the following steps:
- Inspects your flow design to identify all source and target stages.
- Reads the metadata definition of each source stage input link and target stage output link. Each source stage may be configured with multiple output links, and each target stage may be configured with multiple input links.
- Creates an empty test case file for each source and target link, with appropriate metadata definitions.
- Inspects and validate the configuration parameters of your flow.
- Creates a test case specification, which provides references to the parameters of your flow and each newly-created test data file.
Creating a test case
To create a test case for your flow, click the Test case
icon in the toolbar of the DataStage
design canvas and click New test case.
You can also create a test case from the Assets tab of your project by clicking .
Defining test case properties
- On the Create test case page, specify the name and optional description
for your DataStage test case and click
Next.Note: If you started this action through creating a new asset, you must specify a DataStage flow to link to the test case.
- Specify the names of parameters or parameter sets for which your test will supply hardcoded values. Click Create.
Creating test data
There are various ways that you can use to derive data for your test case.
You can capture test data at runtime from a job invocation or import a locally stored CSV data.