Skip to content

Commit

Permalink
V15 QA updated our E2E pipeline to output test artifacts in a clearer…
Browse files Browse the repository at this point in the history
… way (umbraco#17826)

* Updated pipeline to publish acceptance test artifacts for each os. and to run tests from npm command

* Adjustment to the targetPath

* Publish all in results folder

* Moved folder

* Reverted changes

* Added all results in test folder

* Updated naming

* Used semicolon

* Additional semicolons

---------

Co-authored-by: Niels Lyngsø <[email protected]>
  • Loading branch information
andr317c and nielslyngsoe authored Jan 15, 2025
1 parent c8547d9 commit b8ee161
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 34 deletions.
34 changes: 16 additions & 18 deletions build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -492,22 +492,22 @@ stages:
matrix:
LinuxPart1Of3:
vmImage: "ubuntu-latest"
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=1/3'
testCommand: "npm run smokeTest -- --shard=1/3"
LinuxPart2Of3:
vmImage: "ubuntu-latest"
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=2/3'
testCommand: "npm run smokeTest -- --shard=2/3"
LinuxPart3Of3:
vmImage: "ubuntu-latest"
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=3/3'
testCommand: "npm run smokeTest -- --shard=3/3"
WindowsPart1Of3:
vmImage: "windows-latest"
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=1/3'
testCommand: "npm run smokeTest -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=2/3'
testCommand: "npm run smokeTest -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=3/3'
testCommand: "npm run smokeTest -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
Expand Down Expand Up @@ -612,7 +612,7 @@ stages:
# Copy artifacts
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results $(Build.ArtifactStagingDirectory) -Recurse
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
}
displayName: Copy Playwright results
condition: succeededOrFailed()
Expand All @@ -623,8 +623,7 @@ stages:
condition: succeededOrFailed()
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: "Acceptance Tests - $(Agent.JobName) - Attempt #$(System.JobAttempt)"

artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
- job:
displayName: E2E Tests (SQL Server)
variables:
Expand All @@ -635,29 +634,29 @@ stages:
matrix:
${{ if eq(parameters.sqlServerLinuxAcceptanceTests, True) }}:
LinuxPart1Of3:
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=1/3'
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
LinuxPart2Of3:
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=2/3'
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
LinuxPart3Of3:
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=3/3'
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
WindowsPart1Of3:
vmImage: "windows-latest"
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=1/3'
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=2/3'
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=3/3'
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
Expand Down Expand Up @@ -779,7 +778,7 @@ stages:
# Copy artifacts
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results $(Build.ArtifactStagingDirectory) -Recurse
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
}
displayName: Copy Playwright results
condition: succeededOrFailed()
Expand All @@ -790,8 +789,7 @@ stages:
condition: succeededOrFailed()
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: "Acceptance Tests - $(Agent.JobName) - Attempt #$(System.JobAttempt)"

artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
###############################################
## Release
###############################################
Expand Down
32 changes: 16 additions & 16 deletions build/nightly-E2E-test-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,22 +111,22 @@ stages:
matrix:
LinuxPart1Of3:
vmImage: "ubuntu-latest"
testCommand: "npx playwright test DefaultConfig --shard=1/3"
testCommand: "npm run test -- --shard=1/3"
LinuxPart2Of3:
vmImage: "ubuntu-latest"
testCommand: "npx playwright test DefaultConfig --shard=2/3"
testCommand: "npm run test -- --shard=2/3"
LinuxPart3Of3:
vmImage: "ubuntu-latest"
testCommand: "npx playwright test DefaultConfig --shard=3/3"
testCommand: "npm run test -- --shard=3/3"
WindowsPart1Of3:
vmImage: "windows-latest"
testCommand: "npx playwright test DefaultConfig --shard=1/3"
testCommand: "npm run test -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testCommand: "npx playwright test DefaultConfig --shard=2/3"
testCommand: "npm run test -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testCommand: "npx playwright test DefaultConfig --shard=3/3"
testCommand: "npm run test -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
Expand Down Expand Up @@ -235,7 +235,7 @@ stages:
# Copy artifacts
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results $(Build.ArtifactStagingDirectory) -Recurse
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
}
displayName: Copy Playwright results
condition: succeededOrFailed()
Expand All @@ -246,7 +246,7 @@ stages:
condition: succeededOrFailed()
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: 'Acceptance Tests - $(Agent.JobName) - Attempt #$(System.JobAttempt)'
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"

- job:
displayName: E2E Tests (SQL Server)
Expand All @@ -258,29 +258,29 @@ stages:
strategy:
matrix:
LinuxPart1Of3:
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=1/3"
testCommand: "npm run testSqlite -- --shard=1/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
LinuxPart2Of3:
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=2/3"
testCommand: "npm run testSqlite -- --shard=2/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
LinuxPart3Of3:
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=3/3"
testCommand: "npm run testSqlite -- --shard=3/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
WindowsPart1Of3:
vmImage: "windows-latest"
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=1/3"
testCommand: "npm run testSqlite -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=2/3"
testCommand: "npm run testSqlite -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=3/3"
testCommand: "npm run testSqlite -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
Expand Down Expand Up @@ -406,7 +406,7 @@ stages:
# Copy artifacts
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results $(Build.ArtifactStagingDirectory) -Recurse
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
}
displayName: Copy Playwright results
condition: succeededOrFailed()
Expand All @@ -417,4 +417,4 @@ stages:
condition: succeededOrFailed()
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: 'Acceptance Tests - $(Agent.JobName) - Attempt #$(System.JobAttempt)'
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"

0 comments on commit b8ee161

Please sign in to comment.