Last active
July 14, 2022 07:17
TestCafe Azure DevOps Integration : Sample YAML pipeline with videos and screens publishes as artefacts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jobs: | |
- job: Smoke_Staging_Tests | |
displayName: Smoke tests on staging environment | |
continueOnError: true | |
pool: | |
vmImage: "windows-2022" | |
timeoutInMinutes: 180 | |
steps: | |
- script: npm install | |
displayName: "Install TestCafe and other dependencies" | |
- script: npm run smoke_staging_tests | |
displayName: "Run smoke tests against the staging environment" | |
- task: PublishTestResults@2 | |
displayName: "Publishing the test results" | |
condition: always() | |
inputs: | |
testResultsFiles: "**/report.xml" | |
testResultsFormat: "JUnit" | |
publishRunAttachments: true | |
testRunTitle: "Task Results" | |
failTaskOnFailedTests: false | |
- task: CopyFiles@2 | |
condition: always() | |
displayName: "Copying the artifacts (screenshots and videos)" | |
inputs: | |
sourceFolder: "$(Build.SourcesDirectory)" | |
# contents: "artifacts/**/?(*.png|*.mp4)" | |
contents: "artifacts/**" | |
targetFolder: "$(Build.ArtifactStagingDirectory)" | |
- task: PublishBuildArtifacts@1 | |
displayName: "Publishing the artifacts (screenshots and videos) " | |
condition: always() | |
inputs: | |
pathToPublish: "$(Build.ArtifactStagingDirectory)" | |
artifactName: Recorded videos and failure screenshots |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment