Get-BeTestresults
Gets detailled test results of a specific run.
Get-BeTestresults -Connection <Connection> -RunId <Int64> [-Search <String>] [-Status <String[]>] [-Skip <Integer>] [-Take <Integer>]
Description
The Get-BeTestresults
cmdlet returns a list of detailed test results of a specific run.
The test results can be filtered by a search-query or by a list of specific status. The list can also be limited in size by the Skip and Take parameters.
Example
Example 1: Getting all test results of a run
The following example shows how to print out a list of all tes results of a specific run.
# Get detailed testresults of the last Suite-Run $testresults = Get-BeTestresults -RunId $lastRunId -Take 100 -Connection $connection $testresults
Example 2: Getting the test results of a specific test case
The following example shows how to use the search-parameter to get the test results of a specific test case.
# Get detailed testresults of one specific test of the last Suite-Run $testresults = Get-BeTestresults -RunId $lastRunId -Search "#15" -Take 1 -Connection $connection $testresults
Parameters
-Connection
Pass the connection-object returned by the Connect-BeInstance cmdlet.
Type: | Connection |
Mandatory: | Yes |
Position: | Named |
Default Value: | None |
-RunId
The ID of the run whose test results should be returned.
Type: | Int64 |
Mandatory: | Yes |
Position: | Named |
Default Value: | None |
-Search
An optional search query to filter the test results. You may use #15 to find the test results of the test case number 15.
Type: | String |
Mandatory: | No |
Position: | Named |
Default Value: | None |
-Status
The optional status parameter allows to limit the test results to the ones that have a specific status. You can specifiy either one or multiple status at once.
Type: | String[] |
Mandatory: | No |
Position: | Named |
Default Value: | All possible status: “SUCCESS”, “FAILED”, “EXECUTING”, “NOTEVALUATED”, “DIFFERENTDIMENSIONALITY”, “CANCELED”, “NOTENOUGHPROBES”, “EXCEPTION” |
-Skip
The amount of records that should be skipped from the result.
Type: | Integer |
Mandatory: | No |
Position: | Named |
Default Value: | 0 |
-Skip
The amount of records that should be returned.
Type: | Int64 |
Mandatory: | No |
Position: | Named |
Default Value: | 10 |
Output
The cmdlet outputs a GetTestresultsResult-object that contains the following attributes.
Name | Data Type | Description |
---|---|---|
Items | List | A list of TestresultItem-objects that are explained in detail below. |
Total | Int64 | The total amount of available test results. |
Skip | Int64 | The amount of test results that were skipped in the result. |
Take | Int64 | The amount of test results returned by the cmdlet. |
The TestresultItem-object contains the following attributes.
Name | Data Type | Description |
---|---|---|
TestResultId | Int64 | The ID of the test result. |
RunId | List | The ID of the test suite run that produced the test result. |
TestId | Integer | The ID of the test case. |
TestName | String | The name of the test case. |
TestDescription | String | The description of the test case. |
MethodId | String | The ID of the test method used. |
MethodUniqueName | String | The unique name of the test method. |
Status | String | The status of the test result. – Executing – Success – Failed – NotEvaluated – DifferentDimensionality – Canceled – NotEnoughProbes – Exception |
HasPayloadXml | Boolean | Is true if the test result has an attached payload XML file. |
ExecutionSequence | Integer | When a test case was run multiple times (multi-instances), this parameter returns the order of the instances. |
CreatedAt | DateTime | The point in time when the test result was created. |