diff --git a/__tests__/__outputs__/dotnet-xunitv3.md b/__tests__/__outputs__/dotnet-xunitv3.md
new file mode 100644
index 0000000..f27f9e2
--- /dev/null
+++ b/__tests__/__outputs__/dotnet-xunitv3.md
@@ -0,0 +1,26 @@
+
+|Report|Passed|Failed|Skipped|Time|
+|:---|---:|---:|---:|---:|
+|[fixtures/dotnet-xunitv3.trx](#user-content-r0)|1 ✅|3 ❌||267ms|
+## ❌ fixtures/dotnet-xunitv3.trx
+**4** tests were completed in **267ms** with **1** passed, **3** failed and **0** skipped.
+|Test suite|Passed|Failed|Skipped|Time|
+|:---|---:|---:|---:|---:|
+|[DotnetTests.XUnitV3Tests.FixtureTests](#user-content-r0s0)|1 ✅|1 ❌||18ms|
+|[Unclassified](#user-content-r0s1)||2 ❌||0ms|
+### ❌ DotnetTests.XUnitV3Tests.FixtureTests
+```
+❌ Failing_Test
+ Assert.Null() Failure: Value is not null
+ Expected: null
+ Actual: Fixture { }
+ at DotnetTests.XUnitV3Tests.FixtureTests.Failing_Test() in /_/reports/dotnet/DotnetTests.XUnitV3Tests/FixtureTests.cs:line 25
+ at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
+ at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
+✅ Passing_Test
+```
+### ❌ Unclassified
+```
+❌ [Test Class Cleanup Failure (DotnetTests.XUnitV3Tests.FixtureTests.Failing_Test)]
+❌ [Test Class Cleanup Failure (DotnetTests.XUnitV3Tests.FixtureTests.Passing_Test)]
+```
\ No newline at end of file
diff --git a/__tests__/__snapshots__/dotnet-trx.test.ts.snap b/__tests__/__snapshots__/dotnet-trx.test.ts.snap
index 46c8601..f432162 100644
--- a/__tests__/__snapshots__/dotnet-trx.test.ts.snap
+++ b/__tests__/__snapshots__/dotnet-trx.test.ts.snap
@@ -135,6 +135,76 @@ Actual: False
}
`;
+exports[`dotnet-trx tests matches dotnet-xunitv3 report snapshot 1`] = `
+TestRunResult {
+ "path": "fixtures/dotnet-xunitv3.trx",
+ "suites": [
+ TestSuiteResult {
+ "groups": [
+ TestGroupResult {
+ "name": null,
+ "tests": [
+ TestCaseResult {
+ "error": {
+ "details": "Assert.Null() Failure: Value is not null
+Expected: null
+Actual: Fixture { }
+ at DotnetTests.XUnitV3Tests.FixtureTests.Failing_Test() in /_/reports/dotnet/DotnetTests.XUnitV3Tests/FixtureTests.cs:line 25
+ at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
+ at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)",
+ "line": 25,
+ "message": "Assert.Null() Failure: Value is not null
+Expected: null
+Actual: Fixture { }
+ at DotnetTests.XUnitV3Tests.FixtureTests.Failing_Test() in /_/reports/dotnet/DotnetTests.XUnitV3Tests/FixtureTests.cs:line 25
+ at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
+ at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)",
+ "path": "DotnetTests.XUnitV3Tests/FixtureTests.cs",
+ },
+ "name": "Failing_Test",
+ "result": "failed",
+ "time": 17.0545,
+ },
+ TestCaseResult {
+ "error": undefined,
+ "name": "Passing_Test",
+ "result": "success",
+ "time": 0.8786,
+ },
+ ],
+ },
+ ],
+ "name": "DotnetTests.XUnitV3Tests.FixtureTests",
+ "totalTime": undefined,
+ },
+ TestSuiteResult {
+ "groups": [
+ TestGroupResult {
+ "name": null,
+ "tests": [
+ TestCaseResult {
+ "error": undefined,
+ "name": "[Test Class Cleanup Failure (DotnetTests.XUnitV3Tests.FixtureTests.Failing_Test)]",
+ "result": "failed",
+ "time": 0,
+ },
+ TestCaseResult {
+ "error": undefined,
+ "name": "[Test Class Cleanup Failure (DotnetTests.XUnitV3Tests.FixtureTests.Passing_Test)]",
+ "result": "failed",
+ "time": 0,
+ },
+ ],
+ },
+ ],
+ "name": "Unclassified",
+ "totalTime": undefined,
+ },
+ ],
+ "totalTime": 267,
+}
+`;
+
exports[`dotnet-trx tests matches report snapshot (only failed tests) 1`] = `
TestRunResult {
"path": "fixtures/dotnet-trx.trx",
diff --git a/dist/index.js b/dist/index.js
index b7ca089..a5ea165 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -974,7 +974,7 @@ class DotnetTrxParser {
}));
const testClasses = {};
for (const r of unitTestsResults) {
- const className = r.test.TestMethod[0].$.className;
+ const className = r.test.TestMethod[0].$.className ?? "Unclassified";
let tc = testClasses[className];
if (tc === undefined) {
tc = new TestClass(className);
diff --git a/src/parsers/dotnet-trx/dotnet-trx-parser.ts b/src/parsers/dotnet-trx/dotnet-trx-parser.ts
index 826d27c..48a383f 100644
--- a/src/parsers/dotnet-trx/dotnet-trx-parser.ts
+++ b/src/parsers/dotnet-trx/dotnet-trx-parser.ts
@@ -81,7 +81,7 @@ export class DotnetTrxParser implements TestParser {
const testClasses: {[name: string]: TestClass} = {}
for (const r of unitTestsResults) {
- const className = r.test.TestMethod[0].$.className
+ const className = r.test.TestMethod[0].$.className ?? "Unclassified"
let tc = testClasses[className]
if (tc === undefined) {
tc = new TestClass(className)