Search Documentation by Keyword

Confirm-File

You are here:
← All Topics

Performs file validation. Pops up the diff tool on completion, and writes out test results in JUnit format. 

Confirm-File is invoked internally at the end of Test-MedmComponent to compare the test result file (typically generated via database queries) against the certified file. What if your process generates a text file instead of (or in addition to) database rows? Or more than one?

You can certify these files and then confirm new results against them using direct calls to Confirm-File. Place them right after you call Test-MedmComponent.

Syntax

Confirm-File `
    -FilePath <string> `
    -CertifiedFilePath <string> `
    [-SuppressTextDiffPopup] `
    [-TextDiffExe <string>] `
    [-TextDiffParams <string[]>] `
    [-TestName <string>]

Parameters

ParameterRDescription
CertifiedFilePath*Certified test result file. Relative paths will be resolved relative to the current directory.

Example: -CertifiedFilePath "Result.certified.txt"
FilePath*Current test result file. Relative paths will be resolved relative to the current directory.

Example: -FilePath "Result.txt"
TestNameIf present, is included in the Name property of the return object.

Example: -TestName "1000 Load BPS Security"
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}")
×