diff --git a/build/projects/Apps (W1)/.AL-Go/RunTestsInBcContainer.ps1 b/build/projects/Apps (W1)/.AL-Go/RunTestsInBcContainer.ps1 index 139254859c..2e918a592c 100644 --- a/build/projects/Apps (W1)/.AL-Go/RunTestsInBcContainer.ps1 +++ b/build/projects/Apps (W1)/.AL-Go/RunTestsInBcContainer.ps1 @@ -10,8 +10,8 @@ $parameters["returnTrueIfAllPassed"] = $true $script = Join-Path $PSScriptRoot "../../../scripts/RunTestsInBcContainer.ps1" -Resolve $AllTestsPassed = (. $script -parameters $parameters -TestType $testType) -# TODO: For now only run disabled test isolation for unit tests -if ($testType -ne "UnitTest") { +# Uncategorized tests do not have RequiredTestIsolation set on the codeunits +if ($testType -eq "Uncategorized") { return $AllTestsPassed } diff --git a/build/projects/Apps (W1)/.AL-Go/settings.json b/build/projects/Apps (W1)/.AL-Go/settings.json index d4642af59e..462ba90436 100644 --- a/build/projects/Apps (W1)/.AL-Go/settings.json +++ b/build/projects/Apps (W1)/.AL-Go/settings.json @@ -88,8 +88,7 @@ "CZ" ], "settings": { - "country": "cz", - "doNotRunTests": true + "country": "cz" } }, { diff --git a/build/projects/Business Foundation Tests/.AL-Go/RunTestsInBcContainer.ps1 b/build/projects/Business Foundation Tests/.AL-Go/RunTestsInBcContainer.ps1 index afce4643bc..55c85d6a07 100644 --- a/build/projects/Business Foundation Tests/.AL-Go/RunTestsInBcContainer.ps1 +++ b/build/projects/Business Foundation Tests/.AL-Go/RunTestsInBcContainer.ps1 @@ -2,7 +2,16 @@ Param( [Hashtable]$parameters ) -$parameters["testType"] = "UnitTest" +Import-Module (Join-Path $PSScriptRoot "../../../scripts/EnlistmentHelperFunctions.psm1" -Resolve) +$testType = Get-ALGoSetting -Key "testType" +$parameters["returnTrueIfAllPassed"] = $true + +# run test codeunits with specified TestType $script = Join-Path $PSScriptRoot "../../../scripts/RunTestsInBcContainer.ps1" -Resolve -. $script -parameters $parameters \ No newline at end of file +$AllTestsPassed = (. $script -parameters $parameters -TestType $testType) + +# Run test codeunits with RequiredTestIsolation set to Disabled +$AllTestsPassedIsolation = (. $script -parameters $parameters -DisableTestIsolation -TestType $testType) + +return $AllTestsPassed -and $AllTestsPassedIsolation \ No newline at end of file diff --git a/build/projects/Business Foundation Tests/.AL-Go/settings.json b/build/projects/Business Foundation Tests/.AL-Go/settings.json index cc3595e344..b7fe2b4a4f 100644 --- a/build/projects/Business Foundation Tests/.AL-Go/settings.json +++ b/build/projects/Business Foundation Tests/.AL-Go/settings.json @@ -4,5 +4,6 @@ "testFolders": [ "../../../src/Business Foundation/Test" ], - "installOnlyReferencedApps": false + "installOnlyReferencedApps": false, + "testType": "UnitTest" } diff --git a/build/scripts/RunTestsInBcContainer.ps1 b/build/scripts/RunTestsInBcContainer.ps1 index 44dba024b2..43bc946227 100644 --- a/build/scripts/RunTestsInBcContainer.ps1 +++ b/build/scripts/RunTestsInBcContainer.ps1 @@ -69,6 +69,11 @@ if ($DisableTestIsolation) $parameters["testRunnerCodeunitId"] = "130451" # Test Runner with disabled test isolation return Invoke-TestsWithReruns -parameters $parameters -maxReruns 1 # do not retry for Isolation Disabled tests, as they leave traces in the DB +} else +{ # this is neded to reset the parameters, in case of previous run with -DisableTestIsolation + Write-Host "Using RequiredTestIsolation: None" + $parameters["requiredTestIsolation"] = "None" # filtering on tests that don't require Test Isolation + $parameters["testRunnerCodeunitId"] = "130450" # Test Runner with Codeunit test isolation } return Invoke-TestsWithReruns -parameters $parameters