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
{{ message }}
Repository navigation
FailedTestNodeStateProperty should include the ability to report without an exception #2536
The constructors for FailedTestNodeStateProperty do not include the ability to provide extended error information outside of an Exception object.
xUnit.net's error reporting APIs do not include Exception objects. Given our split between runners and execution environment, it may not even be possible for us to re-create instances of the original Exception classes since the types in question may not be available inside the runner infrastructure.
Please provide an alternative way to report errors that allow capturing the essence of Exception without depending on specific instances.
Also, it does not appear that the system can handle inner exceptions, I presume for simplicity's sake. How would expect inner exceptions to be reported in this system? We have a "format" that we use to report messages and stack traces when there are inner exceptions, which of course fit into "strings" just fine, but in the case of stack traces they aren't necessarily guaranteed to be "one stack frame per line" since some of the lines describe the relationships. Is that acceptable in the new model?
Activity
MarcoRossignoli commentedon Mar 11, 2024
Do you mean something similar to
Feel free to propose something.
bradwilson commentedon Mar 11, 2024
Based on https://github.com/microsoft/testfx/blob/main/docs/mstest-runner-protocol/001-protocol-intro.md#test-node I would say an overloaded constructor for
FailedTestNodeStatePropertythat would accept amessageandstackTraceparameter makes the most sense.Evangelink commentedon Mar 11, 2024
In case it helps, this is the custom exception I have created to map some failed tests report from VSTest object model to the new platform:
used as
bradwilson commentedon Mar 11, 2024
Since there doesn't appear to be any type reporting on the exceptions, this seems reasonable, albeit hard to discover for general usage. 😄
bradwilson commentedon Mar 11, 2024
Also, it does not appear that the system can handle inner exceptions, I presume for simplicity's sake. How would expect inner exceptions to be reported in this system? We have a "format" that we use to report messages and stack traces when there are inner exceptions, which of course fit into "strings" just fine, but in the case of stack traces they aren't necessarily guaranteed to be "one stack frame per line" since some of the lines describe the relationships. Is that acceptable in the new model?
Evangelink commentedon Oct 28, 2025
Closing as stale as the API now offers what's asked.