Support for VSTS & VSTS Test Attachments
See original GitHub issueCurrent 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
- Check the VSTS portal for the presence of test attachments.
Versions
- Windows 10 April 2018 or Ubuntu (https://github.com/Microsoft/vsts-agent-docker/blob/master/ubuntu/16.04/standard/Dockerfile)
- Cypress: 2.1.0
- VSTS Agent version: 2.133.3
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:12 (2 by maintainers)
Top GitHub Comments
Any update on this one?
You surely have given up on this one