You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keep in mind that xunit already shipped --report-junit. If we will use the same naming for our command-line option (to be aligned with --report-trx), it means that our package will not be compatible with xunit. So xunit users must stick with xunit's implementation of junit and cannot use ours.
I generally think that xunit should have shipped their junit reporter as a separate package.
Hi,
I have done most of the work in my company.
Please find the attached zip. I have a file diretory.build.props that defines a lot of things. So this requires more work to be integrated in a compliant way in testfx. Also, whatever inside the folder "platform" is internal in testfx, so if this code should be integrated, this folder should be removed and code adapted.
My code works just fine with our jenkins under the new Microsft Testing Platform.
It would be great if it could be natively integrated.
Note: The code was written considering my context with .net9 only. I didn't care of other .net versions.
Kind Regards,
François
Keep in mind that xunit already shipped --report-junit.
I recognized this as a potential problem and our 4.0 release renames all our reports to include xunit in the name:
--report-xunit-ctrf Enable generating CTRF (JSON) report
--report-xunit-ctrf-filename The name of the generated CTRF (JSON) report
--report-xunit-html Enable generating HTML report
--report-xunit-html-filename The name of the generated HTML report
--report-xunit-junit Enable generating JUnit (XML) report
--report-xunit-junit-filename The name of the generated JUnit (XML) report
--report-xunit-nunit Enable generating NUnit v3 (XML) report
--report-xunit-nunit-filename The name of the generated NUnit v3 (XML) report
--report-xunit-trx Enable generating TRX (XML) report
--report-xunit-trx-filename The name of the generated TRX (XML) report
--report-xunit-xml Enable generating xUnit.net v2+ (XML) report
--report-xunit-xml-filename The name of the generated xUnit.net v2+ (XML) report
We also added an additional MSBuild "kill switch" to remove all our reports:
is there anything really specific to xunit in the junit plugin?
It is based on our object model, not on the MTP object model, since our reports work in both modes.
Porting it would be possible (and since it's open source and both our projects are "owned" by .NET Foundation, fairly simple from a legal perspective), but the code as-is is not usable outside xUnit.net.
Activity
Youssef1313 commentedon May 28, 2025
Keep in mind that xunit already shipped
--report-junit. If we will use the same naming for our command-line option (to be aligned with--report-trx), it means that our package will not be compatible with xunit. So xunit users must stick with xunit's implementation of junit and cannot use ours.I generally think that xunit should have shipped their junit reporter as a separate package.
Evangelink commentedon May 29, 2025
It's probably not a problem. I mean we can sync with him to move the impl at platform level meaning there would be no need for his impl.
fmaeseele commentedon Aug 26, 2025
Hi,
I have done most of the work in my company.
Please find the attached zip. I have a file diretory.build.props that defines a lot of things. So this requires more work to be integrated in a compliant way in testfx. Also, whatever inside the folder "platform" is internal in testfx, so if this code should be integrated, this folder should be removed and code adapted.
My code works just fine with our jenkins under the new Microsft Testing Platform.
It would be great if it could be natively integrated.
Note: The code was written considering my context with .net9 only. I didn't care of other .net versions.
Kind Regards,
François
JUnitReport.zip
bradwilson commentedon Apr 12, 2026
I recognized this as a potential problem and our 4.0 release renames all our reports to include
xunitin the name:We also added an additional MSBuild "kill switch" to remove all our reports:
<XunitRegisterBuiltInResultWriters>false</XunitRegisterBuiltInResultWriters>Unfortunately, this is also new to 4.0, so this doesn't help older versions.
We will be shipping 4.0 sometime in the next couple months, if that's helpful.
Evangelink commentedon Apr 13, 2026
@bradwislon is there anything really specific to xunit in the junit plugin? If not, could we consider making it "global"?
bradwilson commentedon Apr 13, 2026
It is based on our object model, not on the MTP object model, since our reports work in both modes.
Porting it would be possible (and since it's open source and both our projects are "owned" by .NET Foundation, fairly simple from a legal perspective), but the code as-is is not usable outside xUnit.net.
bradwilson commentedon Apr 13, 2026
Handler: https://github.com/xunit/xunit/blob/rel/4.0.0/src/xunit.v3.runner.common/Results/Builtin/JUnitResultWriterMessageHandler.cs
Tests: https://github.com/xunit/xunit/blob/rel/4.0.0/src/xunit.v3.runner.common.tests/Results/Builtin/JUnitResultWriterMessageHandlerTests.cs
Add Microsoft.Testing.Extensions.JUnitReport extension (#4268) (#8850)