Test Run Class

TestRun is a high-level IDisposable class that initializes and closes data logging sessions. Arguments can be provided directly to the TestRun constructor.

The following .NET syntax example demonstrates initialization of a test run with the using block:

var folderPath = ...
var metadata = new Dictionary<Fields, string>()
{
    {Fields.Operator, "J. Doe"},
    {Fields.Lab, "West Lab"},
    {Fields.ProductName, "PROD432"},

};

using (TestRun run = new TestRun(metadata, folderPath, "Validation Data Log"))
{
	...
}

TestRun can also be used without the using block. However, in this case the Dispose() method must be called to commit the data to disk and close the data logging session. The following .NET syntax example demonstrates initialization of a test run without the using block:

var folderPath = ...
var metadata = ...

var run = new TestRun(metadata, folderPath, "Validation Data Log");
...
run.Dispose();
Table 23. .NET Test Run Class Parameters
Parameter Required? Data Type Description
metadataHeadersAndValues No Dictionary [Field, String] File-level metadata.
folderPath Yes String Folder path to the data log files.
fileName No String Name of the data log file. If fileName is not provided, the Field.ProductName metadata key is required. By default, the file name is set to: Validation_<ProductName>_<Timestamp>.csv