Skip to content

Commit 097d045

Browse files
authored
V13 QA updated pipeline for acceptance to avoid issue when installing playwright (#19140)
* Updated pipeline to install only the chromium browser * Added junit as reporter for acceptance tests
1 parent a22dcf0 commit 097d045

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

build/azure-pipelines.yml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -531,8 +531,8 @@ stages:
531531
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
532532

533533
# Install Playwright and dependencies
534-
- pwsh: npx playwright install --with-deps
535-
displayName: Install Playwright
534+
- pwsh: npx playwright install chromium
535+
displayName: Install Playwright only with Chromium browser
536536
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
537537

538538
# Test
@@ -562,13 +562,24 @@ stages:
562562
displayName: Copy Playwright results
563563
condition: succeededOrFailed()
564564
565-
# Publish
565+
# Publish test artifacts
566566
- task: PublishPipelineArtifact@1
567567
displayName: Publish test artifacts
568568
condition: succeededOrFailed()
569569
inputs:
570570
targetPath: $(Build.ArtifactStagingDirectory)
571571
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
572+
573+
# Publish test results
574+
- task: PublishTestResults@2
575+
displayName: "Publish test results"
576+
condition: succeededOrFailed()
577+
inputs:
578+
testResultsFormat: 'JUnit'
579+
testResultsFiles: '*.xml'
580+
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
581+
testRunTitle: "$(Agent.JobName)"
582+
572583
- job:
573584
displayName: E2E Tests (SQL Server)
574585
condition: or(eq(stageDependencies.Build.A.outputs['build.NBGV_PublicRelease'], 'True'), ${{parameters.sqlServerAcceptanceTests}})
@@ -687,14 +698,13 @@ stages:
687698
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
688699

689700
# Install Playwright and dependencies
690-
- pwsh: npx playwright install --with-deps
691-
displayName: Install Playwright
701+
- pwsh: npx playwright install chromium
702+
displayName: Install Playwright only with Chromium browser
692703
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
693704

694705
# Test
695706
- pwsh: $(testCommand)
696707
displayName: Run Playwright tests
697-
continueOnError: true
698708
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
699709
env:
700710
CI: true
@@ -727,14 +737,24 @@ stages:
727737
displayName: Copy Playwright results
728738
condition: succeededOrFailed()
729739
730-
# Publish
740+
# Publish test artifacts
731741
- task: PublishPipelineArtifact@1
732742
displayName: Publish test artifacts
733743
condition: succeededOrFailed()
734744
inputs:
735745
targetPath: $(Build.ArtifactStagingDirectory)
736746
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
737747

748+
# Publish test results
749+
- task: PublishTestResults@2
750+
displayName: "Publish test results"
751+
condition: succeededOrFailed()
752+
inputs:
753+
testResultsFormat: 'JUnit'
754+
testResultsFiles: '*.xml'
755+
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
756+
testRunTitle: "$(Agent.JobName)"
757+
738758
###############################################
739759
## Release
740760
###############################################

tests/Umbraco.Tests.AcceptanceTest/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const config: PlaywrightTestConfig = {
2525
// We don't want to run parallel, as tests might differ in state
2626
workers: 1,
2727
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
28-
reporter: process.env.CI ? 'line' : 'html',
28+
reporter: process.env.CI ? [['line'], ['junit', {outputFile: 'results/results.xml'}]] : 'html',
2929
outputDir : "./results",
3030

3131
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */

0 commit comments

Comments
 (0)