Class
TestResult

Class representing a test result.

Definition

Namespace:ArtOfTest.WebAii.Design.Execution

Assembly:ArtOfTest.WebAii.Design.dll

Syntax:

cs-api-definition
[KnownType(typeof(BrowserStateCaptureMode))]
[KnownType(typeof(TechnologyType))]
public class TestResult : INotifyPropertyChanged

Inheritance: objectTestResult

Implements: INotifyPropertyChanged

Constructors

TestResult()

Empty constructor needed for serialization.

Declaration

cs-api-definition
public TestResult()

TestResult(Test)

Initializes a new TestResult instance based on the given Test object.

Declaration

cs-api-definition
public TestResult(Test test)

Parameters

test

Test

The test object.

Properties

AllTestStepCount

Calculate all test step count.

Declaration

cs-api-definition
public int AllTestStepCount { get; }

Property Value

int

All test step count.

Browser

Declaration

cs-api-definition
public BrowserType Browser { get; set; }

Property Value

BrowserType

CommitedBy

Declaration

cs-api-definition
public string CommitedBy { get; set; }

Property Value

string

DataIterationResults

Gets the data iteration results when IsDataDrivenResult is set to true

Declaration

cs-api-definition
public IList<DataIterationResult> DataIterationResults { get; }

Property Value

IList<DataIterationResult>

Duration

Gets the duration of test execution.

Declaration

cs-api-definition
public TimeSpan Duration { get; }

Property Value

TimeSpan

EndTime

Gets the time when the test ended execution.

Declaration

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

Property Value

DateTime

ExeType

Declaration

cs-api-definition
public ExecutionType ExeType { get; set; }

Property Value

ExecutionType

ExecutingTestStepCount

Declaration

cs-api-definition
public int ExecutingTestStepCount { get; }

Property Value

int

FailureException

Gets the execution exception causing the test failure.

Declaration

cs-api-definition
public ExecutionException FailureException { get; }

Property Value

ExecutionException

FirstFailedStepComment

Declaration

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

Property Value

string

HasWarnings

Declaration

cs-api-definition
public bool HasWarnings { get; set; }

Property Value

bool

Id

Declaration

cs-api-definition
public Guid Id { get; set; }

Property Value

Guid

IsDataDrivenResult

Gets whether the result contains data driven results

Declaration

cs-api-definition
public bool IsDataDrivenResult { get; }

Property Value

bool

IsManualResult

Declaration

cs-api-definition
public bool IsManualResult { get; set; }

Property Value

bool

IsRerun

Gets the test rerun state.

Declaration

cs-api-definition
public bool IsRerun { get; set; }

Property Value

bool

Message

Gets/Sets the message of this result.

Declaration

cs-api-definition
public string Message { get; set; }

Property Value

string

NotRunStepDescriptions

Gets the descriptions of the not executed steps so that we don't have to get the test behind this result in order to show all descriptions.

Declaration

cs-api-definition
public IList<string> NotRunStepDescriptions { get; }

Property Value

IList<string>

The not run step descriptions.

Parent

Declaration

cs-api-definition
public RunResult Parent { get; set; }

Property Value

RunResult

PercentComplete

Declaration

cs-api-definition
public float PercentComplete { get; }

Property Value

float

PerfResult

Declaration

cs-api-definition
public ResultsFileXmlRoot PerfResult { get; set; }

Property Value

ResultsFileXmlRoot

ProfilerResultsId

The permanent ID of the profiler results file, for verification and in case the path changes.

Declaration

cs-api-definition
public Guid ProfilerResultsId { get; set; }

Property Value

Guid

ProfilerResultsPath

The location on disk of the Profiler database associated with this test run. This is not the final path etched in stone, rather it is used more like a cached value to prevent a long enumeration. If the path is invalid, the enumeration will have to take place regardless.

Declaration

cs-api-definition
public string ProfilerResultsPath { get; set; }

Property Value

string

ProjectPath

Gets the project path that contains this test.

Declaration

cs-api-definition
public string ProjectPath { get; set; }

Property Value

string

Result

Gets/Sets the result type of this result object.

Declaration

cs-api-definition
public ResultType Result { get; set; }

Property Value

ResultType

ScreenRecordingResultCodec

Recording codec.

Declaration

cs-api-definition
public string ScreenRecordingResultCodec { get; set; }

Property Value

string

ScreenRecordingResultError

Gets/Sets the screen recording path of this result.

Declaration

cs-api-definition
public string ScreenRecordingResultError { get; set; }

Property Value

string

ScreenRecordingResultPath

Gets/Sets the screen recording path of this result.

Declaration

cs-api-definition
public string ScreenRecordingResultPath { get; set; }

Property Value

string

ScreenRecordingResultSize

Recording size in bytes.

Declaration

cs-api-definition
public long ScreenRecordingResultSize { get; set; }

Property Value

long

SeparatorLineCharCount

Declaration

cs-api-definition
public int SeparatorLineCharCount { get; set; }

Property Value

int

StartTime

Gets the time when the test started execution

Declaration

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

Property Value

DateTime

StepResults

Gets the AutomationStep results

Declaration

cs-api-definition
public IList<AutomationStepResult> StepResults { get; }

Property Value

IList<AutomationStepResult>

TestDescription

The test description to help users in case of failure.

Declaration

cs-api-definition
public string TestDescription { get; set; }

Property Value

string

TestId

Gets or sets the test unique Id behind this result.

Declaration

cs-api-definition
public string TestId { get; set; }

Property Value

string

TestName

Gets the test name within the project.

Declaration

cs-api-definition
public string TestName { get; set; }

Property Value

string

TestOwner

The test owner to present in case of failure.

Declaration

cs-api-definition
public string TestOwner { get; set; }

Property Value

string

TestPath

Gets the test path within the project.

Declaration

cs-api-definition
public string TestPath { get; set; }

Property Value

string

TotalNumberOfNotRunSteps

Gets the total number of not run automation steps.

Declaration

cs-api-definition
public int TotalNumberOfNotRunSteps { get; }

Property Value

int

The total number of not run steps.

TotalPassedSteps

Gets the total number of passed automation steps.

Declaration

cs-api-definition
public int TotalPassedSteps { get; }

Property Value

int

VersionGroupKey

Declaration

cs-api-definition
public Guid VersionGroupKey { get; set; }

Property Value

Guid

Methods

AddDataIterationResult(DataIterationResult)

Adds a data iteration result

Declaration

cs-api-definition
public void AddDataIterationResult(DataIterationResult result)

Parameters

result

DataIterationResult

The result to add

AddStepResult(AutomationStepResult)

Declaration

cs-api-definition
public void AddStepResult(AutomationStepResult stepResult)

Parameters

stepResult

AutomationStepResult

AddStepResult(AutomationStepResult, bool)

Add an automation step result to this test.

Declaration

cs-api-definition
public void AddStepResult(AutomationStepResult stepResult, bool appendMessage)

Parameters

stepResult

AutomationStepResult

The result to add.

appendMessage

bool

AppendMessage(string)

Appends a messsage to the result.

Declaration

cs-api-definition
public void AppendMessage(string message)

Parameters

message

string

The message to append.

AppendOverallResult(bool)

Append the overall result of this test execution.

Declaration

cs-api-definition
public void AppendOverallResult(bool isExecution = true)

Parameters

isExecution

bool

Whether the method is called during execution (and not from the UI) so that we can set the end time.

AppendSeparatorLine()

Append a default separator line.

Declaration

cs-api-definition
public void AppendSeparatorLine()

AppendSeparatorLine(char, int)

Append a separator to the result

Declaration

cs-api-definition
public void AppendSeparatorLine(char repeatChar, int count)

Parameters

repeatChar

char

The repeat char to use for the separator line.

count

int

Number of characters to join

ExportToResultFile(string, string)

Exports the test result into a Test Studio run result file.

Declaration

cs-api-definition
public bool ExportToResultFile(string path, string name)

Parameters

path

string

The path to the result file.

name

string

The name of the result file.

Returns

bool

True for success, false otherwise.

OnPropertyChanged(string)

Declaration

cs-api-definition
protected virtual void OnPropertyChanged(string propertyName)

Parameters

propertyName

string

PersistTestFailureResourcesOnDisk(string, string)

Save results resources to disk.

Declaration

cs-api-definition
public void PersistTestFailureResourcesOnDisk(string projectResultsPath, string resourceFolder)

Parameters

projectResultsPath

string

resourceFolder

string

PrependMessage(string)

Prepend a specific message to the log.

Declaration

cs-api-definition
public void PrependMessage(string message)

Parameters

message

string

RecalculateStepResults(bool)

Declaration

cs-api-definition
public void RecalculateStepResults(bool isExecution = true)

Parameters

isExecution

bool

RemoveLastStepResult()

Declaration

cs-api-definition
public void RemoveLastStepResult()

SetStartTime()

Sets the start time of the execution of this test // TODO: add to persistence

Declaration

cs-api-definition
public void SetStartTime()

Events

PropertyChanged

Declaration

cs-api-definition
public event PropertyChangedEventHandler PropertyChanged

Event Value

PropertyChangedEventHandler

Implements INotifyPropertyChanged.PropertyChanged