-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for screenshots #22
Comments
No, currently there's no support for attachments/screenshots and I wasn't aware that trx supported this. I don't see that mocha has support for such feature.
How would your workflow look like? Do you expect mocha-trx-reporter to add a construct like those, so you can attach screenshot for a given test? Or maybe look for files using some file naming convention? |
At first I assume that mocha supported it natively, but this is indeed not the case. It would be really nice if we could figure out how to do this, because it would help everyone who uses one of these tools in combination with Azure DevOps. |
Also interested by the feature ! |
I've ran into the same issue last week, and managed to get this working. So most important, I can confirm that Azure Devops + My setup is using Cypress, logging to I'd like to raise a PR for this but it feels like too much of my fix is Cypress specific, and "magic string" based, so might be out of scope for a Mocha package. My solution works as follows:
If we leave out the Cypress-specific parts of the solution, that leaves a few questions that must be resolved before this can be made into a PR:
@pmoleri @marklagendijk any opinions on this? I'm unsure who the package maintainer is here, sorry. |
Hi @w5l I recently learnt that Azure recommendation is to use JUnit as that's an open format as opposed to .trx which is an internal undocumented format. |
The JUnit reporter supports test attachments, and Azure DevOps supports JUnit, but doesn't support attachments defined in JUnit. It's interesting that Microsoft recommends against using their "own" format which has better support. From microsoft/azure-pipelines-tasks#2058 (comment) (from 2016 but the issue is still unresolved)
Since I found no Mocha NUnit reporter, this TRX reporter is the obvious way to go. The underlying |
To answer one of my own questions (question 1 above): The We should be compatible with that, then. |
Support for screenshots would be very useful: Azure Devops Pipelines do not support attachments from JUnit reports, but only from TRX reports. See this issue.
The node-trx library has support for attachments. See the code for usage.
The text was updated successfully, but these errors were encountered: