question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for VSTS & VSTS Test Attachments

See original GitHub issue

Current behavior:

I’ve installed Cypress into a project built on VSTS. To get cypress to run on the Linux Hosted agents I had to perform the following additional steps:

apt-get -qq -y update
apt-get -qq -y install xvfb libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2

To get reporting to work (to get status information in the VSTS release dashboard) I configured the junit reporter:

cypress run --reporter junit

This works up to a certain point. Cypress runs, a junit report is generated, but all of the recorded videos are ignored after the run is completed.

VSTS supports uploading test attachments when they are referenced in the test report. I tried configuring the xunit-file reporter, but no attachment is added. I tried configuring the mocha-trx-reporter (native visual studio format), but it crashes when running with cypress.

TypeError: test.isPending is not a function
    at C:\temp\node_modules\mocha-trx-reporter\lib\trx.js:63:22
    at Array.forEach (<anonymous>:null:null)
    at Runner.<anonymous> (C:\temp\node_modules\mocha-trx-reporter\lib\trx.js:62:34)
    at emitOne (events.js:120:20)
    at Runner.emit (events.js:210:7)
    at Reporter.emit (C:\temp\node_modules\cypress\dist\Cypress\resources\app\packages\server\lib\reporter.js:191:55)
    at Object.server.startWebsockets.onMocha (C:\temp\node_modules\cypress\dist\Cypress\resources\app\packages\server\lib\project.js:288:22)
    at Socket.<anonymous> (C:\temp\node_modules\cypress\dist\Cypress\resources\app\packages\server\lib\socket.js:237:36)
    at emitOne (events.js:115:13)
    at Socket.emit (events.js:210:7)
    at C:\temp\node_modules\cypress\dist\Cypress\resources\app\packages\socket\node_modules\socket.io\lib\socket.js:503:12
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

Desired behavior:

Cypress logs the recorded video as test attachment in the generated test results so that Visual Studio Team Services can associate them to the test results and show them in the portal.

Steps to reproduce:

  • Run cypress in a Visual Studio Team Services build.
  • Run the “Upload test results” step and publish the results file

image

  • Check the VSTS portal for the presence of test attachments.

Versions

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:9
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
hmilascommented, Aug 28, 2020

Any update on this one?

4reactions
hmilascommented, Aug 28, 2020

You surely have given up on this one

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to show VSTS Test Case attachments when running Test
Currently, there is no way that can made the attachments(screenshots) which are added to a Test Case will show when running test cases....
Read more >
VSTest@2 - Visual Studio Test v2 task - Microsoft Learn
Use this task to run unit and functional tests (Selenium, Appium, Coded UI test, etc.) using the Visual Studio Test (VSTest) runner.
Read more >
Visual Studio Test has Upload Test Attachments set to false ...
The 'Visual Studio Test' task has an option named 'Upload test attachments', regardless of if this option is on or off for a...
Read more >
Test Management Tool Connectors: Azure DevOps (formerly ...
Test Management Tool Connectors: Azure DevOps (formerly VSTS/TFS) · 1. Launch Visual Studio and and from the main menu, select Team -> Manage...
Read more >
Run TestComplete Tests as Part of a Pipeline
If your test agents do not have Visual Studio installed, you can add the Install Visual Studio Test Platform task to the stage....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found