Search Documentation by Keyword

Test-MedmComponent

You are here:
← All Topics

Executes a Markit EDM component from the command line using the CADISProcessAgent executable, and optionally compare the resulting text file against a certified version.

Inject data and perform other test preparation using the -SetupSqlDir and -SetupSqlFiles parameters. SQL scripts will be executed against the database, and CSV files will be imported as described in Import-CsvTable.

Specify a test results text file using the -TestResultPath parameter, and populate the file from the database using -ResultSqlDir and -ResultSqlFiles. These scripts will be run in the order referenced.

If specified, -CleanupSqlDir and -CleanupSqlFiles indicate any SQL scripts to be run in order to clean up after test execution and restore system state.

All -xxxSqlFiles parameters provide an array of regex patterns. Files will be recursively located in or beneath -xxxSqlDir, and executed or imported in the order listed. If a given regex pattern returns more than one result, then files returned for that pattern will be executed or imported in the order returned.

Syntax

Test-MedmComponent `
    [-ProcessAgentPath <string>] `
    [-DbServer <string>] `
    [-DbName <string>] `
    [-SetupSqlDir <string>] `
    [-SetupSqlFiles <string>] `
    -ComponentName <string> `
    -ComponentType <string> `
    [-ConfigurableParams <string>] `
    [-ResultSqlDir <string>] `
    [-ResultSqlFiles <string>] `
    [-OutputTable] `
    [-CleanupSqlDir <string>] `
    [-CleanupSqlFiles <string>] `
    -TestResultPath <string> `
    [-CertifiedResultPath <string>] `
    [-TextDiffExe <string>] `
    [-TextDiffParams <string[]>] `
    [-TestName <string>] `
    [-SkipProcess]

Parameters

ParameterRDescription
ProcessAgentPathPath to command line executable for target MEDM version.

Default: $Global:MedmProcessAgentPath

Example: -ProcessAgentPath "C:\Program Files\Markit Group\Markit EDM_10_5_3_1\CadisProcessAgent.exe"
DbServerThe target SQL Server database server address.

Default: $Global:MedmDbServer

Example: -DbServer "MyDbServer"
DbNameThe target SQL Server database name.

Default: $Global:MedmDbName

Example: -DbName "MyDb"
SetupSqlDirA directory containing SQL scripts to be executed prior to component invocation. Relative paths will be resolved relative to the current directory.

Default: $pwd

Example: -SetupSqlDir ".\SetupSql"
SetupSqlFilesA comma-delimited list of RegEx patterns indicating SQL script files to be executed and/or CSV data files to be imported. All files must be nested within the directory indicated by -SetupSqlDir.

Example: -SetupSqlFiles "\.csv$"
ComponentName*The name of the MEDM component to be executed.

Example: -ComponentName "My Solution"
ComponentType*The type of the MEDM component to be executed. Valid values: DataPorter, DataInspector, DataMatcherProcess, DataConstructor, Solution.

Example: -ComponentType: "Solution"
ConfigurableParamsA delimited list of MEDM configurable parameter name=value pairs. Pairs are delimited with a ":". Only include parameters that must be explicitly set; those retaining default values may be omitted. Parameter names and values must not contain characters "=" or ":".

Example: -ConfigurableParams "param1=value1:param2=value2"
ResultSqlDirA directory containing SQL scripts to extract test results after component execution. Relative paths will be resolved relative to the current directory.

Default: $pwd

Example: -ResultSqlDir ".\ResultSql"
ResultSqlFilesA comma-delimited list of RegEx patterns indicating SQL script files to extract test results after component execution. All must be located within the directory indicated by -ResultSqlDir.

Example: -ResultSqlFiles "\.sql$"
OutputTableSwitch parameter. If present, causes output data to be formatted as a table. Otherwise output data is formatted as a list.

Example: -OutputTable
CleanupSqlDirA directory containing SQL scripts to be executed following component invocation. Relative paths will be resolved relative to the current directory.

Default: $pwd

Example: -CleanupSqlDir ".\CleanupSql"
CleanupSqlFilesA comma-delimited list of RegEx patterns indicating SQL script files to be executed following component invocation. All must be nested within the directory indicated by -CleanupSqlDir.

Example: -CleanupSqlFiles "\.sql$"
TestResultPath*Destination file for test result scripts. Relative paths will be resolved relative to the current directory, and any existing file of the same name will be overwritten.

Example: -TestResultPath "Result.txt"
CertifiedResultPathCertified test result file. Relative paths will be resolved relative to the current directory.

Example: -CertifiedFilePath "Result.certified.txt"
TextDiffExeThe local path to your text comparison engine's executable (WinMerge by default).

Default: $Global:TextDiffExe

Example: -TextDiffExe "C:\Program Files (x86)\WinMerge\WinMergeU.exe"
TextDiffParamsAn array of strings representing the text comparison engine's command-line parameters. Tokens {CurrentResult} and {CertfiedResult} will be replaced by the relevant file names.

Default: $Global:TextDiffParams

Example: -TextDiffParams @("/e", "/s", "/u", "/wl", "/wr", "/dl", "Current Result", "/dr", "Certified Result", "{CurrentResult}", "{CertifiedResult}")
TestNameIf present, is included in the Name property of the return object.

Example: -TestName "1000 Load BPS Security"
SkipProcessSwitch parameter. If present, all test scripts are run but the process execution is only simulated.

Example: -SkipProcess
×