Skip to content

Commit 2ebc6ba

Browse files
authoredMar 3, 2025··
V15 QA Publish E2E test results in the Azure pipeline (#18498)
* Updated playwright config to export the Junit report * Published the Junit report * Fixed * Updated outputDir * Make one test failed * Changed npm command * Fixed outputFile * Updated folder to export test result * Make another tests failed * Updated publish test results job * Changed testSQLite command * Updated testRunTitle * Changed npm command * Updated testRunTitle * Reverted * Fixed comment * Make some tests failed to test * Reverted
1 parent 2bb894c commit 2ebc6ba

File tree

3 files changed

+46
-3
lines changed

3 files changed

+46
-3
lines changed
 

‎build/azure-pipelines.yml

+24-2
Original file line numberDiff line numberDiff line change
@@ -623,13 +623,24 @@ stages:
623623
displayName: Copy Playwright results
624624
condition: succeededOrFailed()
625625
626-
# Publish
626+
# Publish test artifacts
627627
- task: PublishPipelineArtifact@1
628628
displayName: Publish test artifacts
629629
condition: succeededOrFailed()
630630
inputs:
631631
targetPath: $(Build.ArtifactStagingDirectory)
632632
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
633+
634+
# Publish test results
635+
- task: PublishTestResults@2
636+
displayName: "Publish test results"
637+
condition: succeededOrFailed()
638+
inputs:
639+
testResultsFormat: 'JUnit'
640+
testResultsFiles: '*.xml'
641+
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
642+
testRunTitle: "$(Agent.JobName)"
643+
633644
- job:
634645
displayName: E2E Tests (SQL Server)
635646
variables:
@@ -788,13 +799,24 @@ stages:
788799
displayName: Copy Playwright results
789800
condition: succeededOrFailed()
790801
791-
# Publish
802+
# Publish test artifacts
792803
- task: PublishPipelineArtifact@1
793804
displayName: Publish test artifacts
794805
condition: succeededOrFailed()
795806
inputs:
796807
targetPath: $(Build.ArtifactStagingDirectory)
797808
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
809+
810+
# Publish test results
811+
- task: PublishTestResults@2
812+
displayName: "Publish test results"
813+
condition: succeededOrFailed()
814+
inputs:
815+
testResultsFormat: 'JUnit'
816+
testResultsFiles: '*.xml'
817+
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
818+
testRunTitle: "$(Agent.JobName)"
819+
798820
###############################################
799821
## Release
800822
###############################################

‎build/nightly-E2E-test-pipelines.yml

+20
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,16 @@ stages:
248248
targetPath: $(Build.ArtifactStagingDirectory)
249249
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
250250

251+
# Publish test results
252+
- task: PublishTestResults@2
253+
displayName: "Publish test results"
254+
condition: succeededOrFailed()
255+
inputs:
256+
testResultsFormat: 'JUnit'
257+
testResultsFiles: '*.xml'
258+
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
259+
testRunTitle: "$(Agent.JobName)"
260+
251261
- job:
252262
displayName: E2E Tests (SQL Server)
253263
timeoutInMinutes: 180
@@ -418,3 +428,13 @@ stages:
418428
inputs:
419429
targetPath: $(Build.ArtifactStagingDirectory)
420430
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
431+
432+
# Publish test results
433+
- task: PublishTestResults@2
434+
displayName: "Publish test results"
435+
condition: succeededOrFailed()
436+
inputs:
437+
testResultsFormat: 'JUnit'
438+
testResultsFiles: '*.xml'
439+
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
440+
testRunTitle: "$(Agent.JobName)"

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export default defineConfig({
2323
// We don't want to run parallel, as tests might differ in state
2424
workers: 1,
2525
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
26-
reporter: process.env.CI ? 'line' : 'html',
26+
//reporter: process.env.CI ? 'line' : 'html',
27+
reporter: process.env.CI ? [['line'], ['junit', {outputFile: 'results/results.xml'}]] : 'html',
2728
outputDir: "./results",
2829
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
2930
use: {

0 commit comments

Comments
 (0)
Please sign in to comment.