Skip to content

Commit b8ee161

Browse files
V15 QA updated our E2E pipeline to output test artifacts in a clearer way (#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]>
1 parent c8547d9 commit b8ee161

File tree

2 files changed

+32
-34
lines changed

2 files changed

+32
-34
lines changed

build/azure-pipelines.yml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -492,22 +492,22 @@ stages:
492492
matrix:
493493
LinuxPart1Of3:
494494
vmImage: "ubuntu-latest"
495-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=1/3'
495+
testCommand: "npm run smokeTest -- --shard=1/3"
496496
LinuxPart2Of3:
497497
vmImage: "ubuntu-latest"
498-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=2/3'
498+
testCommand: "npm run smokeTest -- --shard=2/3"
499499
LinuxPart3Of3:
500500
vmImage: "ubuntu-latest"
501-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=3/3'
501+
testCommand: "npm run smokeTest -- --shard=3/3"
502502
WindowsPart1Of3:
503503
vmImage: "windows-latest"
504-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=1/3'
504+
testCommand: "npm run smokeTest -- --shard=1/3"
505505
WindowsPart2Of3:
506506
vmImage: "windows-latest"
507-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=2/3'
507+
testCommand: "npm run smokeTest -- --shard=2/3"
508508
WindowsPart3Of3:
509509
vmImage: "windows-latest"
510-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=3/3'
510+
testCommand: "npm run smokeTest -- --shard=3/3"
511511
pool:
512512
vmImage: $(vmImage)
513513
steps:
@@ -612,7 +612,7 @@ stages:
612612
# Copy artifacts
613613
- pwsh: |
614614
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
615-
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results $(Build.ArtifactStagingDirectory) -Recurse
615+
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
616616
}
617617
displayName: Copy Playwright results
618618
condition: succeededOrFailed()
@@ -623,8 +623,7 @@ stages:
623623
condition: succeededOrFailed()
624624
inputs:
625625
targetPath: $(Build.ArtifactStagingDirectory)
626-
artifact: "Acceptance Tests - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
627-
626+
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
628627
- job:
629628
displayName: E2E Tests (SQL Server)
630629
variables:
@@ -635,29 +634,29 @@ stages:
635634
matrix:
636635
${{ if eq(parameters.sqlServerLinuxAcceptanceTests, True) }}:
637636
LinuxPart1Of3:
638-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=1/3'
637+
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
639638
vmImage: "ubuntu-latest"
640639
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
641640
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
642641
LinuxPart2Of3:
643-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=2/3'
642+
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
644643
vmImage: "ubuntu-latest"
645644
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
646645
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
647646
LinuxPart3Of3:
648-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=3/3'
647+
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
649648
vmImage: "ubuntu-latest"
650649
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
651650
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
652651
WindowsPart1Of3:
653652
vmImage: "windows-latest"
654-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=1/3'
653+
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
655654
WindowsPart2Of3:
656655
vmImage: "windows-latest"
657-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=2/3'
656+
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
658657
WindowsPart3Of3:
659658
vmImage: "windows-latest"
660-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=3/3'
659+
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
661660
pool:
662661
vmImage: $(vmImage)
663662
steps:
@@ -779,7 +778,7 @@ stages:
779778
# Copy artifacts
780779
- pwsh: |
781780
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
782-
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results $(Build.ArtifactStagingDirectory) -Recurse
781+
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
783782
}
784783
displayName: Copy Playwright results
785784
condition: succeededOrFailed()
@@ -790,8 +789,7 @@ stages:
790789
condition: succeededOrFailed()
791790
inputs:
792791
targetPath: $(Build.ArtifactStagingDirectory)
793-
artifact: "Acceptance Tests - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
794-
792+
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
795793
###############################################
796794
## Release
797795
###############################################

build/nightly-E2E-test-pipelines.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -111,22 +111,22 @@ stages:
111111
matrix:
112112
LinuxPart1Of3:
113113
vmImage: "ubuntu-latest"
114-
testCommand: "npx playwright test DefaultConfig --shard=1/3"
114+
testCommand: "npm run test -- --shard=1/3"
115115
LinuxPart2Of3:
116116
vmImage: "ubuntu-latest"
117-
testCommand: "npx playwright test DefaultConfig --shard=2/3"
117+
testCommand: "npm run test -- --shard=2/3"
118118
LinuxPart3Of3:
119119
vmImage: "ubuntu-latest"
120-
testCommand: "npx playwright test DefaultConfig --shard=3/3"
120+
testCommand: "npm run test -- --shard=3/3"
121121
WindowsPart1Of3:
122122
vmImage: "windows-latest"
123-
testCommand: "npx playwright test DefaultConfig --shard=1/3"
123+
testCommand: "npm run test -- --shard=1/3"
124124
WindowsPart2Of3:
125125
vmImage: "windows-latest"
126-
testCommand: "npx playwright test DefaultConfig --shard=2/3"
126+
testCommand: "npm run test -- --shard=2/3"
127127
WindowsPart3Of3:
128128
vmImage: "windows-latest"
129-
testCommand: "npx playwright test DefaultConfig --shard=3/3"
129+
testCommand: "npm run test -- --shard=3/3"
130130
pool:
131131
vmImage: $(vmImage)
132132
steps:
@@ -235,7 +235,7 @@ stages:
235235
# Copy artifacts
236236
- pwsh: |
237237
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
238-
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results $(Build.ArtifactStagingDirectory) -Recurse
238+
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
239239
}
240240
displayName: Copy Playwright results
241241
condition: succeededOrFailed()
@@ -246,7 +246,7 @@ stages:
246246
condition: succeededOrFailed()
247247
inputs:
248248
targetPath: $(Build.ArtifactStagingDirectory)
249-
artifact: 'Acceptance Tests - $(Agent.JobName) - Attempt #$(System.JobAttempt)'
249+
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
250250

251251
- job:
252252
displayName: E2E Tests (SQL Server)
@@ -258,29 +258,29 @@ stages:
258258
strategy:
259259
matrix:
260260
LinuxPart1Of3:
261-
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=1/3"
261+
testCommand: "npm run testSqlite -- --shard=1/3"
262262
vmImage: "ubuntu-latest"
263263
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
264264
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
265265
LinuxPart2Of3:
266-
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=2/3"
266+
testCommand: "npm run testSqlite -- --shard=2/3"
267267
vmImage: "ubuntu-latest"
268268
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
269269
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
270270
LinuxPart3Of3:
271-
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=3/3"
271+
testCommand: "npm run testSqlite -- --shard=3/3"
272272
vmImage: "ubuntu-latest"
273273
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
274274
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
275275
WindowsPart1Of3:
276276
vmImage: "windows-latest"
277-
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=1/3"
277+
testCommand: "npm run testSqlite -- --shard=1/3"
278278
WindowsPart2Of3:
279279
vmImage: "windows-latest"
280-
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=2/3"
280+
testCommand: "npm run testSqlite -- --shard=2/3"
281281
WindowsPart3Of3:
282282
vmImage: "windows-latest"
283-
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=3/3"
283+
testCommand: "npm run testSqlite -- --shard=3/3"
284284
pool:
285285
vmImage: $(vmImage)
286286
steps:
@@ -406,7 +406,7 @@ stages:
406406
# Copy artifacts
407407
- pwsh: |
408408
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
409-
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results $(Build.ArtifactStagingDirectory) -Recurse
409+
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
410410
}
411411
displayName: Copy Playwright results
412412
condition: succeededOrFailed()
@@ -417,4 +417,4 @@ stages:
417417
condition: succeededOrFailed()
418418
inputs:
419419
targetPath: $(Build.ArtifactStagingDirectory)
420-
artifact: 'Acceptance Tests - $(Agent.JobName) - Attempt #$(System.JobAttempt)'
420+
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"

0 commit comments

Comments
 (0)