forked from microsoft/navcontainerhelper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
microsoft#3441: Add support for "TestCodeunitRangeFilter" field
- Loading branch information
1 parent
f578432
commit a3b2bf0
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,6 +101,27 @@ function Set-ExtensionId | |
$ClientContext.SaveValue($extensionIdControl, $ExtensionId) | ||
} | ||
|
||
function Set-TestCodeunitRange | ||
( | ||
[string] $testCodeunitRange, | ||
[ClientContext] $ClientContext, | ||
[switch] $debugMode, | ||
$Form | ||
) { | ||
if (!$testCodeunitRange) { return } | ||
This comment has been minimized.
Sorry, something went wrong.
freddydk
|
||
if ($testCodeunitRange = "*") { $testCodeunitRange = "" } | ||
|
||
if ($debugMode) { | ||
Write-Host "Setting test codeunit range '$testCodeunitRange'" | ||
} | ||
$testCodeunitRangeControl = $ClientContext.GetControlByName($Form, "TestCodeunitRangeFilter") | ||
if ($null -eq $testCodeunitRangeControl) { | ||
if ($debugMode) { Write-Host "Test codeunit range control not found on test page" } | ||
return | ||
} | ||
$ClientContext.SaveValue($testCodeunitRangeControl, $testCodeunitRange) | ||
} | ||
|
||
function Set-TestRunnerCodeunitId | ||
( | ||
[string] $testRunnerCodeunitId, | ||
|
@@ -304,6 +325,7 @@ function Get-Tests { | |
[int] $testPage = 130409, | ||
[string] $testSuite = "DEFAULT", | ||
[string] $testCodeunit = "*", | ||
[string] $testCodeunitRange = "*", | ||
[string] $extensionId = "", | ||
[string] $testRunnerCodeunitId = "", | ||
[array] $disabledtests = @(), | ||
|
@@ -345,6 +367,7 @@ function Get-Tests { | |
|
||
if ($testPage -eq 130455) { | ||
Set-ExtensionId -ExtensionId $extensionId -Form $form -ClientContext $clientContext -debugMode:$debugMode | ||
Set-TestCodeunitRange -testCodeunitRange $testCodeunitRange -Form $form -ClientContext $clientContext -debugMode:$debugMode | ||
Set-TestRunnerCodeunitId -TestRunnerCodeunitId $testRunnerCodeunitId -Form $form -ClientContext $clientContext -debugMode:$debugMode | ||
Set-RunFalseOnDisabledTests -DisabledTests $DisabledTests -Form $form -ClientContext $clientContext -debugMode:$debugMode | ||
$clientContext.InvokeAction($clientContext.GetActionByName($form, 'ClearTestResults')) | ||
|
@@ -492,6 +515,7 @@ function Run-Tests { | |
[int] $testPage = 130409, | ||
[string] $testSuite = "DEFAULT", | ||
[string] $testCodeunit = "*", | ||
[string] $testCodeunitRange = "*", | ||
[string] $testGroup = "*", | ||
[string] $testFunction = "*", | ||
[string] $extensionId = "", | ||
|
@@ -558,6 +582,7 @@ function Run-Tests { | |
|
||
if ($testPage -eq 130455) { | ||
Set-ExtensionId -ExtensionId $extensionId -Form $form -ClientContext $clientContext -debugMode:$debugMode | ||
Set-TestCodeunitRange -testCodeunitRange $testCodeunitRange -Form $form -ClientContext $clientContext -debugMode:$debugMode | ||
Set-TestRunnerCodeunitId -TestRunnerCodeunitId $testRunnerCodeunitId -Form $form -ClientContext $clientContext -debugMode:$debugMode | ||
Set-RunFalseOnDisabledTests -DisabledTests $DisabledTests -Form $form -ClientContext $clientContext -debugMode:$debugMode | ||
$clientContext.InvokeAction($clientContext.GetActionByName($form, 'ClearTestResults')) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What is the command-line-testtool?
Please specify what the default is (must be empty, thus ignored)