Added publish Junit test results
This commit is contained in:
parent
ac6afbefdf
commit
2ea0a61529
1 changed files with 14 additions and 14 deletions
|
|
@ -160,8 +160,10 @@ stages:
|
||||||
$(dockerImageName):$(imageTag) \
|
$(dockerImageName):$(imageTag) \
|
||||||
bash -c "echo \"Moving Playwright reports out of subfolders...\" &&
|
bash -c "echo \"Moving Playwright reports out of subfolders...\" &&
|
||||||
find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \; &&
|
find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \; &&
|
||||||
|
PLAYWRIGHT_JUNIT_OUTPUT_DIR='/app/test_results'
|
||||||
|
PLAYWRIGHT_JUNIT_OUTPUT_NAME='junit_results.xml'
|
||||||
echo \"Merging reports...\" &&
|
echo \"Merging reports...\" &&
|
||||||
npx playwright merge-reports --reporter=ortoni-report ./playwright-reports
|
npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports
|
||||||
echo \"Contents of ortoni-report:\" && ls ./ortoni-report &&
|
echo \"Contents of ortoni-report:\" && ls ./ortoni-report &&
|
||||||
echo 'Current dir: ' && pwd
|
echo 'Current dir: ' && pwd
|
||||||
echo 'Contents of current dir: ' && ls
|
echo 'Contents of current dir: ' && ls
|
||||||
|
|
@ -180,8 +182,7 @@ stages:
|
||||||
# Copy test results from container
|
# Copy test results from container
|
||||||
echo "Copying test results..."
|
echo "Copying test results..."
|
||||||
docker cp $container_id:/app/ortoni-report/. $(System.DefaultWorkingDirectory)/ortoni-report
|
docker cp $container_id:/app/ortoni-report/. $(System.DefaultWorkingDirectory)/ortoni-report
|
||||||
# docker cp $container_id:/app/test-results/junit_results.xml $(System.DefaultWorkingDirectory)
|
docker cp $container_id:/app/test-results/junit_results.xml $(System.DefaultWorkingDirectory)/test-results
|
||||||
# TODO: Update to include junit results if necessary
|
|
||||||
|
|
||||||
# Remove container
|
# Remove container
|
||||||
echo "Cleaning up container..."
|
echo "Cleaning up container..."
|
||||||
|
|
@ -190,17 +191,16 @@ stages:
|
||||||
JIRA_API_KEY: $(JIRA_API_KEY)
|
JIRA_API_KEY: $(JIRA_API_KEY)
|
||||||
displayName: merge_and_publish_results_to_jira
|
displayName: merge_and_publish_results_to_jira
|
||||||
|
|
||||||
# TODO: Enable later when working on PR gate
|
- task: PublishTestResults@2
|
||||||
# - task: PublishTestResults@2
|
displayName: 'Publish test results'
|
||||||
# displayName: 'Publish test results'
|
inputs:
|
||||||
# inputs:
|
searchFolder: 'test-results'
|
||||||
# searchFolder: 'test-results'
|
testResultsFormat: 'JUnit'
|
||||||
# testResultsFormat: 'JUnit'
|
testResultsFiles: 'junit_results.xml'
|
||||||
# testResultsFiles: 'junit_results.xml'
|
mergeTestResults: true
|
||||||
# mergeTestResults: true
|
failTaskOnFailedTests: false
|
||||||
# failTaskOnFailedTests: false
|
testRunTitle: 'Playwright Tests'
|
||||||
# testRunTitle: 'Playwright Tests'
|
condition: succeededOrFailed()
|
||||||
# condition: succeededOrFailed()
|
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@1
|
- task: PublishPipelineArtifact@1
|
||||||
displayName: 'Publish Merged Report'
|
displayName: 'Publish Merged Report'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue