Purpose
This command…
-
converts MettleCI Unit Test specifications authored for Classic DataStage Jobs into Test Cases compatible with Cloud Pak for Data NextGen DataStage Flows then imports them into the specified Cloud Pak for Data project; and
-
converts the associated test data files into a format compatible with Test Cases for NextGen DataStage and packages them as a single zip file containing all data files for all Unit Tests processed by the command. The contents of this zip file are for subsequent manual migration to the relevant test data storage location, as nominated for use by the specified Cloud Pak for Data project.
Prior to using this command, it is strongly recommended to have a Connection asset configured for the purpose of test data storage (in your Cloud Pak for Data Project settings). The converted test data file must by unzipped (preserving all directory names and hierarchy) in the root of the storage location that is referred to by that Connection asset. The top-level parent directory in the zip file is named projects.
Syntax
unittest migrate [options]
Options
-
-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 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 when -project is not specified)
-
-project
Name of the target CP4D/CP4DaaS project (required when -project-id is not specified)
-
-test-data-archive
Target test data archive containing migrated test data files
Required
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