Skip to content
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

Marking .trx unit tests as retried? #4334

Open
AndrewCraswell opened this issue Mar 1, 2023 · 2 comments
Open

Marking .trx unit tests as retried? #4334

AndrewCraswell opened this issue Mar 1, 2023 · 2 comments

Comments

@AndrewCraswell
Copy link

AndrewCraswell commented Mar 1, 2023

Description

Apologies if this is not the correct place for this question. I am working on a end-to-end testing plugin for Playwright to allow test results to be exported as VSTest .trx files to be uploaded the Azure Pipelines test report. Allowing us to use this format would give options that aren't available to alternative test result formats like JUnit. Namely, we want to support attachments (images, video, diagnostics) which JUnit doesn't support. We've got this functionality built out but are having a couple problems understanding the .trx file schema.

I want to be able to identify when a specific test failed and was retried. Playwright allows us to configure how many retry attempts should be made, but we aren't seeing that detail when opening the file in Visual Studio Test Explorer or viewing the report in Azure Pipelines. I want to be able to identify flaky tests, but not sure if that can be done by using just the .trx schema. I couldn't find the actual schema definition for .trx files, so am not sure how to proceed.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage This item should be discussed in the next triage meeting. label Mar 1, 2023
@Evangelink
Copy link
Member

The trx file format is quite old and inherited but sadly we don't have its specification/schema. Because of the many tools parsing it, we usually avoid any change to it.

@nohwnd Any extra info we could provide here?

@Evangelink Evangelink added exp: trx and removed needs-triage This item should be discussed in the next triage meeting. labels Apr 12, 2023
@nohwnd
Copy link
Member

nohwnd commented Apr 14, 2023

I don't think retries are supported in trx because the format was always driven by the capabilities of testhost, which technically does support retrying a test, but there is nothing explicit on TestObject, so you can just express them in test properties, and then your UI has to handle them.

AzDO supports retries, but I think it retries on the whole run level, so it will produce a whole new TRX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants