Genetec / azure-devops-extension-publishtestresultscreenshot

Azure DevOps extension used in CI pipeline to upload screenshot in test results report.
https://marketplace.visualstudio.com/items?itemName=Genetec.publish-test-result-screenshot
Apache License 2.0
10 stars 6 forks source link

[error] read ECONNRESET occurs (rarely reproduced) #10

Closed emakhachek closed 2 months ago

emakhachek commented 3 years ago

Agent pool: [Private pool] Agent specification: [ubuntu] Context: [Web] Test result format: [jUnit]

Describe the bug Sometimes task fails with the error (rarely reproduced):

[error]read ECONNRESET

image

To Reproduce Steps to reproduce the behavior:

  1. Launch tests.
  2. Wait till execution is finished.
  3. Observe test results.
    • stage: Build jobs:
      • job: TestRun timeoutInMinutes: ${{variables.timeout}} pool: BUILD-LINUX steps:
      • task: DockerCmd@7 displayName: 'Test execution' #Custom task continueOnError: true inputs: dockerfile: 'Dockerfile' dockerImage: 'myImage' imageSource: 'Dockerfile' dockerRunArgs: --ipc=host --memory=6g --shm-size=1g dockerCmd: | xvfb-run --auto-servernum npm run test ${{parameters.suite}} /bin/bash -c "if [[ -d "/e2e/results/screenshotsGlobalSetup" ]]; then aws s3 cp /e2e/results/screenshotsGlobalSetup s3://myBucket --recursive; fi" dockerCmdExecuteAll: true mountCustomVolume: true externalMountLocation: '$(Build.ArtifactStagingDirectory)/results/' internalMountLocation: '/e2e/results'
      • task: Bash@3 displayName: 'Fail build if no test run' inputs: targetType: 'inline' script: if [[ ! -d "$(Build.ArtifactStagingDirectory)/results/jest-junit-report" ]]; then exit 1; fi
      • task: PublishTestResults@2 displayName: 'Publish test results' inputs: searchFolder: '$(Build.ArtifactStagingDirectory)/results/jest-junit-report'
      • task: Genetec.publish-test-result-screenshot.pipeline-extension.PublishTestResultScreenshot@0 displayName: 'Publish test result screenshots' inputs: organization: myorg screenshotFolder: '$(Build.ArtifactStagingDirectory)/results/screenshots'

Expected behavior No error occurs.

kjgen commented 2 months ago

Closing issue because the extension is being deprecated and will no longer be maintained. An alternative solution is to use the Publish Test Result task which now supports file attachments.