Skip to content

TestMonitor

Paul Spangler edited this page May 9, 2019 · 2 revisions

NationalInstruments.SystemLink.Clients.TestMonitor

Contents

ITestDataManager type

Namespace

NationalInstruments.SystemLink.Clients.TestMonitor

Summary

Represents common operations on test data.

CreateResult(resultData) method

Summary

Creates a test result from its associated data.

Returns

The created test result.

Parameters
Name Type Description
resultData NationalInstruments.SystemLink.Clients.TestMonitor.ResultData Data elements describing the result to create.
Exceptions
Name Description
System.ArgumentNullException if resultData is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

CreateResultAsync(resultData) method

Summary

Asynchronously creates a test result from its associated data.

Returns

The created test result.

Parameters
Name Type Description
resultData NationalInstruments.SystemLink.Clients.TestMonitor.ResultData Data elements describing the result to create.
Exceptions
Name Description
System.ArgumentNullException if resultData is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

CreateStep(data) method

Summary

Creates a new step by ID.

Returns

The created test step.

Parameters
Name Type Description
data NationalInstruments.SystemLink.Clients.TestMonitor.StepData Data elements describing the step to create.
Exceptions
Name Description
System.ArgumentNullException if data is null.
System.ArgumentException if data does not have a Result ID.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

CreateStepAsync(data) method

Summary

Asynchronously creates a new step by ID.

Returns

The created test step.

Parameters
Name Type Description
data NationalInstruments.SystemLink.Clients.TestMonitor.StepData Data elements describing the step to create.
Exceptions
Name Description
System.ArgumentNullException if data is null.
System.ArgumentException if data does not have a Result ID.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

CreateSteps(data) method

Summary

Creates multiple new steps by ID.

Returns

The created test steps.

Parameters
Name Type Description
data System.Collections.Generic.IEnumerable{NationalInstruments.SystemLink.Clients.TestMonitor.StepData} Multiple sets of data elements, each describing a single step to create.
Exceptions
Name Description
System.ArgumentNullException if data is null.
System.ArgumentException if data contains a null element, or contains an element without a result ID.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

CreateStepsAsync(data) method

Summary

Asynchronously creates multiple new steps by ID.

Returns

The created test steps.

Parameters
Name Type Description
data System.Collections.Generic.IEnumerable{NationalInstruments.SystemLink.Clients.TestMonitor.StepData} Multiple sets of data elements, each describing a single step to create.
Exceptions
Name Description
System.ArgumentNullException if data is null.
System.ArgumentException if data contains a null element, or contains an element without a result ID.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

UpdateResult(resultId,resultData) method

Summary

Updates a test result by ID with new data.

Returns

The updated test result.

Parameters
Name Type Description
resultId System.Guid The ID of the result to update.
resultData NationalInstruments.SystemLink.Clients.TestMonitor.ResultData The new data to update resultId with.
Exceptions
Name Description
System.ArgumentNullException if resultData is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

UpdateResult(resultId,resultData,replace) method

Summary

Updates a test result by ID with new data, and optionally replaces keywords and properties.

Returns

The updated test result.

Parameters
Name Type Description
resultId System.Guid The ID of the result to update.
resultData NationalInstruments.SystemLink.Clients.TestMonitor.ResultData The new data to update resultData with.
replace System.Boolean Whether to fully replace resultId's keywords and properties with the given data instead of merging them.
Exceptions
Name Description
System.ArgumentNullException if resultData is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

UpdateResultAsync(resultId,resultData) method

Summary

Asynchronously updates a test result by ID with new data.

Returns

The updated test result.

Parameters
Name Type Description
resultId System.Guid The ID of the result to update.
resultData NationalInstruments.SystemLink.Clients.TestMonitor.ResultData The new data to update resultId with.
Exceptions
Name Description
System.ArgumentNullException if resultData is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

UpdateResultAsync(resultId,resultData,replace) method

Summary

Asynchronously updates a test result by ID with new data, and optionally replaces keywords and properties.

Returns

The updated test result.

Parameters
Name Type Description
resultId System.Guid The ID of the result to update.
resultData NationalInstruments.SystemLink.Clients.TestMonitor.ResultData The new data to update resultData with.
replace System.Boolean Whether to fully replace resultId's keywords and properties with the given data instead of merging them.
Exceptions
Name Description
System.ArgumentNullException if resultData is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

ITestResult type

Namespace

NationalInstruments.SystemLink.Clients.TestMonitor

Summary

Represents a single test result, which corresponds to a single test run or sequence.

AutoUpdateTotalTime property

Summary

Indicates whether or not to auto-calculate this result's TotalTimeInSeconds property when creating or updating steps.

Data property

Summary

Gets the user-defined data fields associated with this result.

Id property

Summary

Gets a unique identifier for this result.

UpdatedAt property

Summary

Gets the time at which this result was most recently updated.

CreateStep(data) method

Summary

Creates a new step as a child of this result.

Returns

The created test step.

Parameters
Name Type Description
data NationalInstruments.SystemLink.Clients.TestMonitor.StepData Data elements describing the step to create.
Exceptions
Name Description
System.ArgumentNullException if data is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

CreateStepAsync(data) method

Summary

Asynchronously creates a new step as a child of this result.

Returns

The created test step.

Parameters
Name Type Description
data NationalInstruments.SystemLink.Clients.TestMonitor.StepData Data elements describing the step to create.
Exceptions
Name Description
System.ArgumentNullException if data is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

CreateSteps(data) method

Summary

Creates multiple new steps as a child of this result.

Returns

The created test steps.

Parameters
Name Type Description
data System.Collections.Generic.IEnumerable{NationalInstruments.SystemLink.Clients.TestMonitor.StepData} Multiple sets of data elements, each describing a single step to create.
Exceptions
Name Description
System.ArgumentNullException if data is null.
System.ArgumentException if data contains a null element.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

CreateStepsAsync(data) method

Summary

Asynchronously creates multiple new steps as a child of this result.

Returns

The created test steps.

Parameters
Name Type Description
data System.Collections.Generic.IEnumerable{NationalInstruments.SystemLink.Clients.TestMonitor.StepData} Multiple sets of data elements, each describing a single step to create.
Exceptions
Name Description
System.ArgumentNullException if data is null.
System.ArgumentException if data contains a null element.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

DetermineStatusFromSteps() method

Summary

Automatically assigns a status to this result which is determined by the statuses of all its related steps.

Returns

The updated result.

Parameters

This method has no parameters.

Exceptions
Name Description
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

DetermineStatusFromStepsAsync() method

Summary

Asynchronously assigns a status to this result which is determined by the statuses of all its related steps.

Returns

The updated result.

Parameters

This method has no parameters.

Exceptions
Name Description
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

Update(data) method

Summary

Updates this test result with new data.

Parameters
Name Type Description
data NationalInstruments.SystemLink.Clients.TestMonitor.ResultData The new data to update this result with.
Exceptions
Name Description
System.ArgumentNullException if data is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

Update(data,replace) method

Summary

Updates this test result with new data, and optionally replaces keywords and properties.

Parameters
Name Type Description
data NationalInstruments.SystemLink.Clients.TestMonitor.ResultData The new data to update this result with.
replace System.Boolean Whether to fully replace this result's keywords and properties with the given data instead of merging them.
Exceptions
Name Description
System.ArgumentNullException if data is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

UpdateAsync(data) method

Summary

Asynchronously updates this test result with new data.

Parameters
Name Type Description
data NationalInstruments.SystemLink.Clients.TestMonitor.ResultData The new data to update this result with.
Exceptions
Name Description
System.ArgumentNullException if data is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

UpdateAsync(data,replace) method

Summary

Asynchronously updates this test result with new data, and optionally replaces keywords and properties.

Parameters
Name Type Description
data NationalInstruments.SystemLink.Clients.TestMonitor.ResultData The new data to update this result with.
replace System.Boolean Whether to fully replace this result's keywords and properties with the given data instead of merging them.
Exceptions
Name Description
System.ArgumentNullException if data is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

ITestStep type

Namespace

NationalInstruments.SystemLink.Clients.TestMonitor

Summary

Represents a Test Monitor step, which corresponds to a single test, test grouping, comparison, or action.

Data property

Summary

Gets the user-defined data fields associated with this step.

ParentId property

Summary

The StepId value of this step's parent, or null if this step is top-level.

ResultId property

Summary

The Id value of this step's associated test result.

UpdatedAt property

Summary

Gets the time at which this step was most recently updated.

CreateStep(data) method

Summary

Creates a new step as a child of this step.

Returns

The created test step.

Parameters
Name Type Description
data NationalInstruments.SystemLink.Clients.TestMonitor.StepData Data elements describing the step to create.
Exceptions
Name Description
System.ArgumentNullException if data is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

CreateStepAsync(data) method

Summary

Asynchronously creates a new step as a child of this step.

Returns

The created test step.

Parameters
Name Type Description
data NationalInstruments.SystemLink.Clients.TestMonitor.StepData Data elements describing the step to create.
Exceptions
Name Description
System.ArgumentNullException if data is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

CreateSteps(data) method

Summary

Creates multiple new steps as a child of this step.

Returns

The created test steps.

Parameters
Name Type Description
data System.Collections.Generic.IEnumerable{NationalInstruments.SystemLink.Clients.TestMonitor.StepData} Multiple sets of data elements, each describing a single step to create.
Exceptions
Name Description
System.ArgumentNullException if data is null.
System.ArgumentException if data contains a null element.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

CreateStepsAsync(data) method

Summary

Asynchronously creates multiple new steps as a child of this step.

Returns

The created test steps.

Parameters
Name Type Description
data System.Collections.Generic.IEnumerable{NationalInstruments.SystemLink.Clients.TestMonitor.StepData} Multiple sets of data elements, each describing a single step to create.
Exceptions
Name Description
System.ArgumentNullException if data is null.
System.ArgumentException if data contains a null element.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

Update(data) method

Summary

Updates this test step with new data.

Parameters
Name Type Description
data NationalInstruments.SystemLink.Clients.TestMonitor.StepData The new data to update this step with.
Exceptions
Name Description
System.ArgumentNullException if data is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

UpdateAsync(data) method

Summary

Asynchronously updates this test step with new data.

Parameters
Name Type Description
data NationalInstruments.SystemLink.Clients.TestMonitor.StepData The new data to update this step with.
Exceptions
Name Description
System.ArgumentNullException if data is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

NamedValue type

Namespace

NationalInstruments.SystemLink.Clients.TestMonitor

Summary

Represents a single named JSON value.

#ctor(name,value) constructor

Summary

Initializes a named value from a name and a value.

Parameters
Name Type Description
name System.String The name of this named value.
value System.Object The value to log.
Exceptions
Name Description
System.ArgumentNullException if name or value is null.

Name property

Summary

The name associated with this logged value.

Value property

Summary

The JSON value, as a plain object.

ResultData type

Namespace

NationalInstruments.SystemLink.Clients.TestMonitor

Summary

The data associated with a single test result. A test result corresponds to one test run or sequence.

FileIds property

Summary

A list of SystemLink File service IDs representing files associated with this result.

HostName property

Summary

The hostname of the system upon which this test result was executed. If not provided, this value will automatically default to the current system's hostname.

Keywords property

Summary

A list of user-customizable queryable strings attached to this result.

Operator property

Summary

An identifier for the individual or mechanism that is executing the test.

Product property

Summary

The type of unit under test.

ProgramName property

Summary

The name of the test program, bucket, or sequence which produced this result.

Properties property

Summary

A set of user-customizable queryable key-value-pairs attached to this result.

SerialNumber property

Summary

An identifier for the specific instance of the unit under test.

StartedAt property

Summary

The time and date at which this test began executing. If not provided, this value is automatically determined by SystemLink.

Status property

Summary

Represents the current execution state of this result.

SystemId property

Summary

A unique identifier of the system upon which this test result was executed. In the case of a SystemLink managed system, this should be the system's Minion ID. If not provided, this value will automatically default to the Minion ID if the current system is registered.

TotalTimeInSeconds property

Summary

The total time, in seconds, that this test was executing for. If not provided, this value is automatically determined by SystemLink.

Status type

Namespace

NationalInstruments.SystemLink.Clients.TestMonitor

Summary

Represents the current state of a test result or step.

#ctor(statusType) constructor

Summary

Constructs a Status from a StatusType. The StatusName value is automatically determined.

Parameters
Name Type Description
statusType NationalInstruments.SystemLink.Clients.TestMonitor.StatusType The StatusType to use.

#ctor(statusType,statusName) constructor

Summary

Constructs a Status with a provided StatusType, plus an overriding descriptive name.

Parameters
Name Type Description
statusType NationalInstruments.SystemLink.Clients.TestMonitor.StatusType The StatusType representing this status.
statusName System.String The override string name to use.

#ctor(statusName) constructor

Summary

Constructs a custom status given a user-defined string.

Parameters
Name Type Description
statusName System.String The user-defined name of the status.

StatusName property

Summary

A descriptive string representing this status.

StatusType property

Summary

The StatusType representing this status.

StatusType type

Namespace

NationalInstruments.SystemLink.Clients.TestMonitor

Summary

Represents the current state of a test result or step.

Custom constants

Summary

Used to represent a state which is not represented by any other StatusType.

Done constants

Summary

Represents a generic completion state for a test or setup action.

Errored constants

Summary

Represents a test which failed to execute due to an error.

Failed constants

Summary

Represents a test which has completed and failed.

Looping constants

Summary

Represents a test that is waiting to be re-executed in some control flows.

Passed constants

Summary

Represents a test which has completed and passed.

Running constants

Summary

Represents a test which is currently executing.

Skipped constants

Summary

Represents a test that was acknowledged but not executed.

Terminated constants

Summary

Represents a test which was manually stopped during execution.

TimedOut constants

Summary

Represents a test which was set to Running, but was not updated for over 24 hours, and therefore is assumed to have stopped executing.

Waiting constants

Summary

Represents a test which is waiting for some event to occur before it can begin executing.

StepData type

Namespace

NationalInstruments.SystemLink.Clients.TestMonitor

Summary

Represents a single test, test grouping, comparison, or action.

#ctor() constructor

Summary

Initializes the data members of a step.

Parameters

This constructor has no parameters.

#ctor(stepId,resultId,parentId) constructor

Summary

Initializes the data members of a step along with the step's identifiers.

Parameters
Name Type Description
stepId System.String The StepId of this step.
resultId System.Guid The Id of this step's associated result.
parentId System.String The StepId of this step's parent, or null if this step has no parent.
Exceptions
Name Description
System.ArgumentNullException if stepId is null.
System.ArgumentException if stepId or resultId is empty.

DataModel property

Summary

A string name indicating the expected keys in Parameters

Inputs property

Summary

A collection of named JSON values which were passed to this test.

Name property

Summary

The name of this step.

Outputs property

Summary

A collection of named JSON values which were logged by this test.

Parameters property

Summary

A set of key-value-pair dictionaries used for storing measurements or other user-customized test data.

ParentId property

Summary

The StepId value of this step's direct parent, or null, if no such parent exists.

ResultId property

Summary

The Id value of this step's associated result.

StartedAt property

Summary

The time and date at which this test began executing. If not provided, this value is automatically determined by SystemLink.

Status property

Summary

Represents the current execution state of this step.

StepId property

Summary

A string used to uniquely identify this step among the other steps associated with a test result. If not provided, SystemLink will determine this identifier automatically. Most users should not provide this value themselves. Some exceptions include users who are uploading test data to SystemLink where data elements already have predefined unique identifiers.

StepType property

Summary

The type of test or action that this step represents.

Text property

Summary

A user-customizable string field used for storing any text data associated with this test. For instance, this may be used for storing a stacktrace, or a test string.

TotalTimeInSeconds property

Summary

The total time, in seconds, that this test was executing for. If not provided, this value is automatically determined by SystemLink.

TestDataManager type

Namespace

NationalInstruments.SystemLink.Clients.TestMonitor

Summary

Represents common operations on test data over HTTP.

#ctor() constructor

Summary

Initializes a new test data manager which will communicate over HTTP using the configuration provided by SystemLink Client. The system must be either be registered to a SystemLink Server, or it must be a SystemLink server itself.

Parameters

This constructor has no parameters.

Exceptions
Name Description
NationalInstruments.SystemLink.Clients.Core.ApiException if the current system cannot communicate with a SystemLink Server,
or if the configuration provided by SystemLink Client cannot be found.

#ctor(configuration) constructor

Summary

Initializes a new test data manager which will communicate over HTTP using the configuration provided by configuration.

Parameters
Name Type Description
configuration NationalInstruments.SystemLink.Clients.Core.IHttpConfiguration Specifies the web server, authentication, and metadata to use for communication.
Exceptions
Name Description
System.ArgumentNullException if configuration is null.

AutoUpdateTotalTime property

Summary

Indicates whether or not to auto-calculate results' TotalTimeInSeconds property when creating or updating steps.

CreateResult(resultData) method

Summary

Creates a test result from its associated data.

Returns

The created test result.

Parameters
Name Type Description
resultData NationalInstruments.SystemLink.Clients.TestMonitor.ResultData Data elements describing the result to create.
Exceptions
Name Description
System.ArgumentNullException if ResultData is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

CreateResultAsync(resultData) method

Summary

Asynchronously creates a test result from its associated data.

Returns

The created test result.

Parameters
Name Type Description
resultData NationalInstruments.SystemLink.Clients.TestMonitor.ResultData Data elements describing the result to create.
Exceptions
Name Description
System.ArgumentNullException if ResultData is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

CreateStep(data) method

Summary

Creates a new step by ID.

Returns

The created test step.

Parameters
Name Type Description
data NationalInstruments.SystemLink.Clients.TestMonitor.StepData Data elements describing the step to create.
Exceptions
Name Description
System.ArgumentNullException if data is null.
System.ArgumentException if data does not have a Result ID.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

CreateStepAsync(data) method

Summary

Asynchronously creates a new step by ID.

Returns

The created test step.

Parameters
Name Type Description
data NationalInstruments.SystemLink.Clients.TestMonitor.StepData Data elements describing the step to create.
Exceptions
Name Description
System.ArgumentNullException if data is null.
System.ArgumentException if data does not have a Result ID.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

CreateSteps(data) method

Summary

Creates multiple new steps by ID.

Returns

The created test steps.

Parameters
Name Type Description
data System.Collections.Generic.IEnumerable{NationalInstruments.SystemLink.Clients.TestMonitor.StepData} Multiple sets of data elements, each describing a single step to create.
Exceptions
Name Description
System.ArgumentNullException if data is null.
System.ArgumentException if data contains a null element, or contains an element without a result ID.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

CreateStepsAsync(data) method

Summary

Asynchronously creates multiple new steps by ID.

Returns

The created test steps.

Parameters
Name Type Description
data System.Collections.Generic.IEnumerable{NationalInstruments.SystemLink.Clients.TestMonitor.StepData} Multiple sets of data elements, each describing a single step to create.
Exceptions
Name Description
System.ArgumentNullException if data is null.
System.ArgumentException if data contains a null element, or contains an element without a result ID.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

UpdateResult(resultId,resultData) method

Summary

Updates a test result by ID with new data.

Returns

The updated test result.

Parameters
Name Type Description
resultId System.Guid The ID of the result to update.
resultData NationalInstruments.SystemLink.Clients.TestMonitor.ResultData The new data to update resultId with.
Exceptions
Name Description
System.ArgumentNullException if resultData is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

UpdateResult(resultId,resultData,replace) method

Summary

Updates a test result by ID with new data, and optionally replaces keywords and properties.

Returns

The updated test result.

Parameters
Name Type Description
resultId System.Guid The ID of the result to update.
resultData NationalInstruments.SystemLink.Clients.TestMonitor.ResultData The new data to update resultData with.
replace System.Boolean Whether to fully replace resultId's keywords and properties with the given data instead of merging them.
Exceptions
Name Description
System.ArgumentNullException if resultData is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

UpdateResultAsync(resultId,resultData) method

Summary

Asynchronously updates a test result by ID with new data.

Returns

The updated test result.

Parameters
Name Type Description
resultId System.Guid The ID of the result to update.
resultData NationalInstruments.SystemLink.Clients.TestMonitor.ResultData The new data to update resultId with.
Exceptions
Name Description
System.ArgumentNullException if resultData is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

UpdateResultAsync(resultId,resultData,replace) method

Summary

Asynchronously updates a test result by ID with new data, and optionally replaces keywords and properties.

Returns

The updated test result.

Parameters
Name Type Description
resultId System.Guid The ID of the result to update.
resultData NationalInstruments.SystemLink.Clients.TestMonitor.ResultData The new data to update resultData with.
replace System.Boolean Whether to fully replace resultId's keywords and properties with the given data instead of merging them.
Exceptions
Name Description
System.ArgumentNullException if resultData is null.
NationalInstruments.SystemLink.Clients.Core.ApiException if the Test Monitor API call fails.

Clone this wiki locally