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

Allow attaching files to test results #4138

Merged
merged 26 commits into from
Nov 26, 2024
Merged

Allow attaching files to test results #4138

merged 26 commits into from
Nov 26, 2024

Conversation

marcphilipp
Copy link
Member

@marcphilipp marcphilipp commented Nov 19, 2024

Overview

Being able to attach files such as screenshots or extra log files to a test is useful to diagnose the outcome of tests. This PR adds an API for Jupiter test authors to do so (TestReporter.publishFile) and includes it when writing the Open Test Reporting XML output (in OpenTestReportGeneratingListener) via a new method on TestExecutionListener. Moreover, it adds OutputDirectoryProvider to EngineDiscoveryRequest so other engines can also attach files and write them to the same output directory and makes it available to TestExecutionListener implementations via TestPlan. The default location of the XML output is changed from OUTPUT_DIR/junit-platform-events-*.xml to OUTPUT_DIR/junit-*/open-test-report.xml.


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

@marcphilipp marcphilipp self-assigned this Nov 19, 2024
@marcphilipp marcphilipp added this to the 5.12 M1 milestone Nov 19, 2024
@marcphilipp marcphilipp force-pushed the marc/file-attachments branch 9 times, most recently from b9c6322 to e6ad7bc Compare November 20, 2024 17:43
@marcphilipp marcphilipp force-pushed the marc/file-attachments branch from b585d12 to e35de2e Compare November 26, 2024 08:55
@marcphilipp marcphilipp force-pushed the marc/file-attachments branch from 8ddc816 to 75fc69b Compare November 26, 2024 09:27
@marcphilipp marcphilipp force-pushed the marc/file-attachments branch from 75fc69b to 4dc74dd Compare November 26, 2024 09:33
@marcphilipp marcphilipp force-pushed the marc/file-attachments branch from 4dc74dd to a3ac17b Compare November 26, 2024 09:35
@marcphilipp marcphilipp marked this pull request as ready for review November 26, 2024 10:46
@marcphilipp marcphilipp merged commit dbd4e2e into main Nov 26, 2024
15 checks passed
@marcphilipp marcphilipp deleted the marc/file-attachments branch November 26, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant