forked from wermspowke/PSTestRail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Operations-Tests.psm1
42 lines (35 loc) · 962 Bytes
/
Operations-Tests.psm1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function Get-TestRailTests
{
param
(
[Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true)]
[Alias('id')]
[int]
$RunId,
[Parameter(Mandatory=$false)]
[int[]]
$StatusId
)
PROCESS
{
$Uri = "get_tests/$RunId"
$Parameters = [System.Web.HttpUtility]::ParseQueryString([String]::Empty)
if ( $PSBoundParameters.ContainsKey("StatusId") )
{
Add-UriParameters -Parameters $Parameters -Hash @{ status_id = [String]::Join(",", $StatusId ) }
}
Invoke-TestRailGetRequest -Uri $Uri -Parameters $Parameters
}
}
function Get-TestRailTestStatuses
{
param
(
)
PROCESS
{
$Uri = "get_statuses"
$Parameters = [System.Web.HttpUtility]::ParseQueryString([String]::Empty)
Invoke-TestRailGetRequest -Uri $Uri -Parameters $Parameters
}
}