C
C#2y ago
Miguel

Catastrophic failure while running xunit tests

When I run dotnet test in my xunit project all the tests pass, however, while the command is running this gets written to the output:
[xUnit.net 00:00:00.45] [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.45] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
[xUnit.net 00:00:00.45] [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.45] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
[xUnit.net 00:00:00.45] [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.45] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
[xUnit.net 00:00:00.45] [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.45] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
[xUnit.net 00:00:00.45] [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.45] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
[xUnit.net 00:00:00.46] [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.46] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
[xUnit.net 00:00:00.45] [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.45] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
[xUnit.net 00:00:00.45] [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.45] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
[xUnit.net 00:00:00.45] [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.45] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
[xUnit.net 00:00:00.45] [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.45] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
[xUnit.net 00:00:00.45] [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.45] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
[xUnit.net 00:00:00.46] [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.46] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
It doesn't even include the line where it failed so I have no idea how to fix it.
2 Replies
ZacharyPatten
ZacharyPatten2y ago
link code if open source
Miguel
MiguelOP2y ago
Fixed, it was because xunit apparently does not play well with implicit conversions, in this case an int to a BigInteger
Want results from more Discord servers?
Add your server