Repository navigation
Run the xUnit v3 test executable directly instead of through dotnet test (~45% faster) - #330
Conversation
|
The changes are slightly odd , but I think what could help is if I first remove the xUnit v2 code (that has been around since February 2025), as that causes a lot of friction. You are also allowed to change the message field in the |
|
Thanks Erik, that makes sense. Removing the xUnit v2 code first would make this a lot simpler, and knowing the messages in Once your change is in, I'll rebase this stack onto it and simplify the three PRs. |
|
Okay, just pushed the changes |
The runner now reads the test results from xUnit's XML report, in place of VSTest's TRX file. Co-authored-by: iHiD <286476+iHiD@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You can redo the pr changes now |
|
Thanks Erik! I'm reworking the stack on top of your changes now and will update all three PRs once it's checked. |
9c0086a to
e725cbb
Compare
|
Thanks Erik, the stack is now reworked on top of your xUnit v2 removal, and I've updated all three descriptions. Your commit comes first in #330, unchanged. With v2 gone and the messages free to change, #330 no longer needs the A few rare cases now give different results, and the #330 description lists them. One is |
Hello 🙂 I'm working with Claude to try and get our tooling faster.
This PR makes this project around 45% faster, and it's the first of three that together make it around 5x faster. I've run it in production to benchmark things in the real world against the most recent few hundred solutions, so I'm confident that it works robustly. However, I've not written the code. I have tried my hardest to get Claude to write sensible messages and comments that explains stuff, but I'd ask for your patience in the fact I'm sending AI code to you. Everything below here is from your friendly neighbourhood LLM...
This is the first of three PRs. Merge them in order: this one (#330), then #331, then #332.
This PR includes Erik's commit that removes xUnit v2, so every exercise uses xUnit v3.
What changed
dotnet buildand runs the test executable directly. Before, every run calleddotnet test, which builds the project and then starts VSTest and a test host to run the tests. An xUnit v3 test project builds to an executable that can run its own tests, so the runner now skips VSTest and the test host.TestResultParser.csreads eachtestelement of the report. The rest of the code is unchanged.\nfor a newline). When the runner reads the report, it converts the escapes back into the original characters.Failure messages
None of the messages in the golden tests change. A few rare messages will change, because VSTest used to rewrite them and the runner now shows what the code produced:
\u0001. The message now has the character itself.If the test executable crashes, or the student's code calls
Environment.Exit, xUnit doesn't write its report, and the run will end with statuserrorand no tests.dotnet testgave the same result for a stack overflow. ForEnvironment.Exit,dotnet testreported a pass covering only the tests that had finished. A failure message containing]]>(very rare) will also giveerror, because xUnit fails while it writes the report.This has been tested in production, and has reduced the median run from 9.0s to 6.2s.
🤖 Generated with Claude Code