Migrating test cases from older DataStage versions
You can convert unit test specifications from classic DataStage® jobs into test cases compatible with NextGen DataStage.
Use the mettleci unittest migrate command that is available in the MettleCI
command line to convert and import test specifications and associated test data files into NextGen
DataStage projects. See the following example:
$> mettleci unittest migrate \
-specs unittest \
-url https://cpd-dm.apps.prod1.dm-cpd.mettleci.cloud \
-user admin \
-api-key **** \
-project RegressionTest_ci \
-test-data-archive TestData.zip
MettleCI Command Line (build 220)
(C) 2018-2022 Data Migrators Pty Ltd
unittest migrate (v1.0-536)
Loading Unit Tests from 'unittest'
Converting Test Spec TR_ORDERS
* Converting Test Data dsEX_Orders-inOrders.csv
* Converting Test Data odbcCity-City.csv
* Converting Test Data odbcCustomer-Customer.csv
* Converting Test Data odbcStockItem-StockItem.csv
* Converting Test Data odbcSalesperson-Salesperson.csv
* Converting Test Data odbcPicker-Picker.csv
* Converting Test Data dsTR_Orders-outOrders.csv
Uploading converted Spec
Test Case 'TR_ORDERS' already exists, skipping
| Property | Description | Requirements |
|---|---|---|
| -specs | Path to unit test specs directory to be used as the source of the migration. | Required |
| -url | Base url of CP4D/CP4DaaS instance to be used as the target of the migration | Required |
| -user | CP4D/CP4DaaS username | Required |
| -api-key | CP4D/CP4DaaS API key | Required |
| -project-id | ID of the target CP4D/CP4DaaS project | Required if the -project is not specified |
| -project | Name of the target CP4D/CP4DaaS project | Required if the -project-id is not specified |
| -test-data-archive | Target test data archive that contains migrated test data files | Required |