Class
RunResult

Represents a collection of test results for a specific run.

Definition

Namespace:ArtOfTest.WebAii.Design.Execution

Assembly:ArtOfTest.WebAii.Design.dll

Syntax:

cs-api-definition
[DataContract]
public class RunResult : IDataTransport, IDispatchableTestResult

Inheritance: objectRunResult

Implements: IDataTransportIDispatchableTestResult

Constructors

RunResult()

Empty constructor for serialization.

Declaration

cs-api-definition
public RunResult()

RunResult(string)

Initializes a new instance of the RunResult object passing the name of the test list.

Declaration

cs-api-definition
public RunResult(string listName)

Parameters

listName

string

The name of the test list generated this result.

Fields

CLOUD_STORAGE_INDEX_NAME

Declaration

cs-api-definition
public const string CLOUD_STORAGE_INDEX_NAME = "CloudRunResult"

Field Value

string

LOCAL_STORAGE_INDEX_NAME

Declaration

cs-api-definition
public const string LOCAL_STORAGE_INDEX_NAME = "LocalRunResult"

Field Value

string

RESULTS_FOLDER_NAME

Declaration

cs-api-definition
public const string RESULTS_FOLDER_NAME = "Results"

Field Value

string

RESULT_FILE_EXTENSION

Declaration

cs-api-definition
public const string RESULT_FILE_EXTENSION = ".aiiresult"

Field Value

string

Properties

AllCount

Declaration

cs-api-definition
[Browsable(false)]
public int AllCount { get; }

Property Value

int

Comment

Declaration

cs-api-definition
[Browsable(false)]
[DataMember]
public string Comment { get; set; }

Property Value

string

DataCollectors

Gets the data collectors info associated with the run result.

Declaration

cs-api-definition
[Browsable(false)]
[DataMember]
public Dictionary<string, string> DataCollectors { get; }

Property Value

Dictionary<string, string>

DispatchGroupId

Declaration

cs-api-definition
[Browsable(false)]
[DataMember]
public Guid DispatchGroupId { get; set; }

Property Value

Guid

EndTime

Gets and sets the run end time.

Declaration

cs-api-definition
[DataMember]
public DateTime EndTime { get; }

Property Value

DateTime

FailedCount

Declaration

cs-api-definition
[Browsable(false)]
[DataMember]
public int FailedCount { get; }

Property Value

int

FailedPercent

Declaration

cs-api-definition
[Browsable(false)]
public double FailedPercent { get; }

Property Value

double

FileName

Gets or sets the friendly name of the result. The default value is generated by the id and the start date.

Declaration

cs-api-definition
[Browsable(false)]
[DataMember]
public string FileName { get; set; }

Property Value

string

HasWarnings

Declaration

cs-api-definition
[DataMember]
[Browsable(false)]
public bool HasWarnings { get; }

Property Value

bool

Id

Gets or sets the data base id. used by the WCF service to match the RunResult with its DB counterpart

Declaration

cs-api-definition
[Browsable(false)]
[DataMember(EmitDefaultValue = true, IsRequired = true)]
public Guid Id { get; set; }

Property Value

Guid

The id.

IsCached

Declaration

cs-api-definition
[Browsable(false)]
public bool IsCached { get; set; }

Property Value

bool

IsCloudResult

Declaration

cs-api-definition
[Browsable(false)]
public bool IsCloudResult { get; set; }

Property Value

bool

IsManual

Declaration

cs-api-definition
[Browsable(false)]
[DataMember]
public bool IsManual { get; set; }

Property Value

bool

LocalEndTime

Declaration

cs-api-definition
public DateTime LocalEndTime { get; }

Property Value

DateTime

Machine

The property is set when an individual test is run. This should really be attached to the test result, as 2 tests can be run on different machines

Declaration

cs-api-definition
[Browsable(false)]
[DataMember(EmitDefaultValue = true)]
public Machine Machine { get; set; }

Property Value

Machine

MachinesAssigned

This contains the list of machines that the user has selected to run a testlist on, and that are available. This may differe slightly from the actual machines that are used- for instance, a machine could crash. To discover the exact machine a test was run on, check the individual test result.

Declaration

cs-api-definition
[Browsable(false)]
public List<string> MachinesAssigned { get; set; }

Property Value

List<string>

Messages

Declaration

cs-api-definition
[Browsable(false)]
[DataMember(EmitDefaultValue = true)]
public List<string> Messages { get; set; }

Property Value

List<string>

Name

Gets or sets the name of the run result. The setter generates the name of the XML file to persist the data into.

Declaration

cs-api-definition
[DataMember]
public string Name { get; }

Property Value

string

NotRunCount

Declaration

cs-api-definition
[Browsable(false)]
[DataMember]
public int NotRunCount { get; }

Property Value

int

PassedCount

The count of the passed test results.

Declaration

cs-api-definition
[Browsable(false)]
[DataMember]
public int PassedCount { get; }

Property Value

int

PassedPercent

Declaration

cs-api-definition
[Browsable(false)]
public double PassedPercent { get; }

Property Value

double

PassedResult

Gets whether all test results passed.

Declaration

cs-api-definition
[Browsable(false)]
[DataMember]
public bool PassedResult { get; }

Property Value

bool

ResultsPath

Declaration

cs-api-definition
[Browsable(false)]
public string ResultsPath { get; set; }

Property Value

string

RunId

Gets or sets the data base id. used by the WCF service to match the RunResult with its DB counterpart

Declaration

cs-api-definition
[Browsable(false)]
[DataMember(EmitDefaultValue = true, IsRequired = true)]
public Guid RunId { get; set; }

Property Value

Guid

The RunId.

StartTime

Gets the run start time.

Declaration

cs-api-definition
[DataMember]
public DateTime StartTime { get; }

Property Value

DateTime

Summary

Gets a brief summary of the run result.

Declaration

cs-api-definition
public string Summary { get; }

Property Value

string

TestListId

Declaration

cs-api-definition
[Browsable(false)]
[DataMember]
public Guid TestListId { get; set; }

Property Value

Guid

TestResults

Gets the list of test results associated with the run result.

Declaration

cs-api-definition
[Browsable(false)]
[DataMember]
public List<TestResult> TestResults { get; }

Property Value

List<TestResult>

Methods

DeleteResources(string, out string)

Delete run result resources from disk if present.

Declaration

cs-api-definition
public static bool DeleteResources(string resultFilePath, out string error)

Parameters

resultFilePath

string

The run result file path.

error

string

Returns

bool

GenerateResultSummary()

Call when the RunResult object is completed (e.g. all test results are added).

Declaration

cs-api-definition
public string GenerateResultSummary()

Returns

string

The summary of the run result.

GetCombinedMachineAssignmentList()

Declaration

cs-api-definition
public string GetCombinedMachineAssignmentList()

Returns

string

LoadFromFile(string)

Loads the RunResult object from the file with given path.

Declaration

cs-api-definition
public static RunResult LoadFromFile(string aiiResultFilePath)

Parameters

aiiResultFilePath

string

The full path to the file.

Returns

RunResult

The run result saved in that file.

OnDeserialized(StreamingContext)

Declaration

cs-api-definition
[OnDeserialized]
protected void OnDeserialized(StreamingContext context)

Parameters

context

StreamingContext

SaveToResultFile(string)

Create the result file from the current run result object.

Declaration

cs-api-definition
public string SaveToResultFile(string outputPath)

Parameters

outputPath

string

The output path.

Returns

string

The full path of the result file.

SaveToResultFile(string, bool)

Declaration

cs-api-definition
public string SaveToResultFile(string outputPath, bool skipResultsFolder)

Parameters

outputPath

string

skipResultsFolder

bool

Returns

string

SaveToResultFile(string, bool, bool)

Declaration

cs-api-definition
public string SaveToResultFile(string outputPath, bool skipResultsFolder, bool persistFailureResources)

Parameters

outputPath

string

skipResultsFolder

bool

persistFailureResources

bool

Returns

string

SaveToResultFile(string, bool, bool, bool)

Create the result file from the current run result object.

Declaration

cs-api-definition
public string SaveToResultFile(string outputPath, bool skipResultsFolder, bool persistFailureResources, bool overrideFile)

Parameters

outputPath

string

The output path.

skipResultsFolder

bool

Whether to skip appending the results folder to the given output path.

persistFailureResources

bool

overrideFile

bool

Returns

string

The full path of the result file.

SaveToResultFile(string, bool, bool, bool, FileFormat)

Declaration

cs-api-definition
public string SaveToResultFile(string outputPath, bool skipResultsFolder, bool persistFailureResources, bool overrideFile, FileFormat fileFormat)

Parameters

outputPath

string

skipResultsFolder

bool

persistFailureResources

bool

overrideFile

bool

fileFormat

FileFormat

Returns

string