Skip to content

Commit f3af93a

Browse files
authored
Add more versions to test (#3469)
Co-authored-by: freddydk <[email protected]>
1 parent f905714 commit f3af93a

4 files changed

+200
-0
lines changed
+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Param(
2+
[string] $licenseFile,
3+
[string] $buildlicenseFile
4+
)
5+
6+
BeforeAll {
7+
. (Join-Path $PSScriptRoot '_TestHelperFunctions.ps1')
8+
$appPublisher = "Cronus Denmark A/S"
9+
$appName = "Hello ÆØÅ"
10+
$appVersion = "1.0.0.0"
11+
$bcAppId = "cb99d78b-f9db-4a1e-822a-0c9c444535df"
12+
$runTestsInVersion = 24
13+
$bcContainerName = "bcserver"
14+
}
15+
16+
AfterAll {
17+
. (Join-Path $PSScriptRoot '_RemoveBcContainer.ps1')
18+
}
19+
20+
Describe 'AppHandling' {
21+
22+
It 'Get/RunTests' {
23+
$artifactUrl = Get-BCArtifactUrl -type Sandbox -version "$runTestsInVersion" -country "w1" -select Latest
24+
New-BcContainer -accept_eula `
25+
-accept_outdated `
26+
-containerName $bcContainerName `
27+
-artifactUrl $artifactUrl `
28+
-auth NavUserPassword `
29+
-Credential $credential `
30+
-updateHosts `
31+
-includeTestToolkit
32+
33+
$tests = (Get-TestsFromBCContainer -containerName $bcContainerName -credential $credential -extensionId "fa3e2564-a39e-417f-9be6-c0dbe3d94069") | Where-Object { $_.id -eq 134006 -or $_.id -eq 134007 }
34+
$tests.Count | Should -be 2
35+
36+
$first = $true
37+
$resultsFile = Join-Path $bcContainerHelperConfig.hostHelperFolder "Extensions\$bcContainerName\result.xml"
38+
$tests | ForEach-Object {
39+
Run-TestsInBcContainer -containerName $bcContainerName `
40+
-credential $credential `
41+
-XUnitResultFileName $resultsFile `
42+
-AppendToXUnitResultFile:(!$first) `
43+
-detailed `
44+
-testCodeunit $_.Id `
45+
-returnTrueIfAllPassed | Out-Null
46+
$first = $false
47+
}
48+
$resultsFile | Should -Exist
49+
}
50+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Param(
2+
[string] $licenseFile,
3+
[string] $buildlicenseFile
4+
)
5+
6+
BeforeAll {
7+
. (Join-Path $PSScriptRoot '_TestHelperFunctions.ps1')
8+
$appPublisher = "Cronus Denmark A/S"
9+
$appName = "Hello ÆØÅ"
10+
$appVersion = "1.0.0.0"
11+
$bcAppId = "cb99d78b-f9db-4a1e-822a-0c9c444535df"
12+
$runTestsInVersion = 22
13+
$bcContainerName = "bcserver"
14+
}
15+
16+
AfterAll {
17+
. (Join-Path $PSScriptRoot '_RemoveBcContainer.ps1')
18+
}
19+
20+
Describe 'AppHandling' {
21+
22+
It 'Get/RunTests' {
23+
$artifactUrl = Get-BCArtifactUrl -type OnPrem -version "$runTestsInVersion" -country "w1" -select Latest
24+
New-BcContainer -accept_eula `
25+
-accept_outdated `
26+
-containerName $bcContainerName `
27+
-artifactUrl $artifactUrl `
28+
-auth NavUserPassword `
29+
-Credential $credential `
30+
-updateHosts `
31+
-includeTestToolkit
32+
33+
$tests = (Get-TestsFromBCContainer -containerName $bcContainerName -credential $credential -extensionId "fa3e2564-a39e-417f-9be6-c0dbe3d94069") | Where-Object { $_.id -eq 134006 -or $_.id -eq 134007 }
34+
$tests.Count | Should -be 2
35+
36+
$first = $true
37+
$resultsFile = Join-Path $bcContainerHelperConfig.hostHelperFolder "Extensions\$bcContainerName\result.xml"
38+
$tests | ForEach-Object {
39+
Run-TestsInBcContainer -containerName $bcContainerName `
40+
-credential $credential `
41+
-XUnitResultFileName $resultsFile `
42+
-AppendToXUnitResultFile:(!$first) `
43+
-detailed `
44+
-testCodeunit $_.Id `
45+
-returnTrueIfAllPassed | Out-Null
46+
$first = $false
47+
}
48+
$resultsFile | Should -Exist
49+
}
50+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Param(
2+
[string] $licenseFile,
3+
[string] $buildlicenseFile
4+
)
5+
6+
BeforeAll {
7+
. (Join-Path $PSScriptRoot '_TestHelperFunctions.ps1')
8+
$appPublisher = "Cronus Denmark A/S"
9+
$appName = "Hello ÆØÅ"
10+
$appVersion = "1.0.0.0"
11+
$bcAppId = "cb99d78b-f9db-4a1e-822a-0c9c444535df"
12+
$runTestsInVersion = 23
13+
$bcContainerName = "bcserver"
14+
}
15+
16+
AfterAll {
17+
. (Join-Path $PSScriptRoot '_RemoveBcContainer.ps1')
18+
}
19+
20+
Describe 'AppHandling' {
21+
22+
It 'Get/RunTests' {
23+
$artifactUrl = Get-BCArtifactUrl -type OnPrem -version "$runTestsInVersion" -country "w1" -select Latest
24+
New-BcContainer -accept_eula `
25+
-accept_outdated `
26+
-containerName $bcContainerName `
27+
-artifactUrl $artifactUrl `
28+
-auth NavUserPassword `
29+
-Credential $credential `
30+
-updateHosts `
31+
-includeTestToolkit
32+
33+
$tests = (Get-TestsFromBCContainer -containerName $bcContainerName -credential $credential -extensionId "fa3e2564-a39e-417f-9be6-c0dbe3d94069") | Where-Object { $_.id -eq 134006 -or $_.id -eq 134007 }
34+
$tests.Count | Should -be 2
35+
36+
$first = $true
37+
$resultsFile = Join-Path $bcContainerHelperConfig.hostHelperFolder "Extensions\$bcContainerName\result.xml"
38+
$tests | ForEach-Object {
39+
Run-TestsInBcContainer -containerName $bcContainerName `
40+
-credential $credential `
41+
-XUnitResultFileName $resultsFile `
42+
-AppendToXUnitResultFile:(!$first) `
43+
-detailed `
44+
-testCodeunit $_.Id `
45+
-returnTrueIfAllPassed | Out-Null
46+
$first = $false
47+
}
48+
$resultsFile | Should -Exist
49+
}
50+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Param(
2+
[string] $licenseFile,
3+
[string] $buildlicenseFile
4+
)
5+
6+
BeforeAll {
7+
. (Join-Path $PSScriptRoot '_TestHelperFunctions.ps1')
8+
$appPublisher = "Cronus Denmark A/S"
9+
$appName = "Hello ÆØÅ"
10+
$appVersion = "1.0.0.0"
11+
$bcAppId = "cb99d78b-f9db-4a1e-822a-0c9c444535df"
12+
$runTestsInVersion = 24
13+
$bcContainerName = "bcserver"
14+
}
15+
16+
AfterAll {
17+
. (Join-Path $PSScriptRoot '_RemoveBcContainer.ps1')
18+
}
19+
20+
Describe 'AppHandling' {
21+
22+
It 'Get/RunTests' {
23+
$artifactUrl = Get-BCArtifactUrl -type OnPrem -version "$runTestsInVersion" -country "w1" -select Latest
24+
New-BcContainer -accept_eula `
25+
-accept_outdated `
26+
-containerName $bcContainerName `
27+
-artifactUrl $artifactUrl `
28+
-auth NavUserPassword `
29+
-Credential $credential `
30+
-updateHosts `
31+
-includeTestToolkit
32+
33+
$tests = (Get-TestsFromBCContainer -containerName $bcContainerName -credential $credential -extensionId "fa3e2564-a39e-417f-9be6-c0dbe3d94069") | Where-Object { $_.id -eq 134006 -or $_.id -eq 134007 }
34+
$tests.Count | Should -be 2
35+
36+
$first = $true
37+
$resultsFile = Join-Path $bcContainerHelperConfig.hostHelperFolder "Extensions\$bcContainerName\result.xml"
38+
$tests | ForEach-Object {
39+
Run-TestsInBcContainer -containerName $bcContainerName `
40+
-credential $credential `
41+
-XUnitResultFileName $resultsFile `
42+
-AppendToXUnitResultFile:(!$first) `
43+
-detailed `
44+
-testCodeunit $_.Id `
45+
-returnTrueIfAllPassed | Out-Null
46+
$first = $false
47+
}
48+
$resultsFile | Should -Exist
49+
}
50+
}

0 commit comments

Comments
 (0)