Open hquinn opened 1 month ago
Sorry to hear @hquinn . Unfortunately this isn't something I can solve and sounds like a Rider issue for mac.
Rider is built to pick up tests using the new Microsoft testing platform protocol. I simply send messages with test statuses and it's up to the IDE after that point.
And just to check, you've built your project? As tests are discovered after a build.
If it's still not working after that I recommend creating an issue with Jetbrains
Hi @thomhurst , I did build the project but didn't show anything in the Test Explorer.
I've logged an issue on YouTrack, so hopefully they will look into this issue.
I am also experiencing this exact same issue on 2024.2.5
In this video it works when enabling testing platform:
In this video it works when enabling testing platform:
We know, we tried, in macOS it is not working even with that enabled. Nick is on windows
I ran into a similar issue in Rider when I made a new unit test project; since the template adds a reference to the Microsoft.NET.Test.Sdk
package, it was also trying to generate an entry point for the tests, so TUnit wasn't showing up. It worked great once I removed that package reference and just had the TUnit reference.
Ah yes the Microsoft.NET.Test.Sdk package is problematic. It basically tells the project to run in the old VSTest mode. I need to update the docs to tell people to remove it!
However the project setup on the original post doesn't include that 😞
The same problem exists on Linux as well. I also filed an issue with Jetbrains for that. I did confirm it works as advertised on windows
Ah yes the Microsoft.NET.Test.Sdk package is problematic. It basically tells the project to run in the old VSTest mode. I need to update the docs to tell people to remove it!
Oh! I thought this was something specific to me and I didn’t mention it, but yeah, I also had that issue. However, it is unrelated to the not showing up on rider for Mac and Linux
I have the same issue on Rider 2024.2.5, MacOS Sequoia and .NET 9 RC1
Anyone that has this issue i recommend upvoting this issue so that Rider prioritise the fix: https://youtrack.jetbrains.com/issue/RIDER-117732/Enable-Testing-Platform-support-doesnt-display-any-unit-tests-from-TUnit.
Anyone that has this issue i recommend upvoting this issue so that Rider prioritise the fix: https://youtrack.jetbrains.com/issue/RIDER-117732/Enable-Testing-Platform-support-doesnt-display-any-unit-tests-from-TUnit.
Done - I've asked my colleagues who use Rider + MacOS to do the same. 😄
Jetbrains have marked the issue as fixed.
Says it'll be available in the Next 2024.3 public build. 🤞
Jetbrains have marked the issue as fixed.
Says it'll be available in the Next 2024.3 public build. 🤞
Have tested this feature in the '2024.3 EAP 4' version, but not much luck unfortunately. I've tagged two employees who have looked into the issue to hopefully shed this to light.
Unfortunately they have closed the ticket. On rider 2024.2.6 on windows the discovery works when using TUnit 0.1.1082 but any version after that it disapplies for me.
I will add a comment to the ticket highlighting this.
The windows issue is new to me... I'll have to verify later
After a bit more fiddling looks like it might be something to do with MSBuild, I was using 8.0.303 but the issue went away when using 9.0.100-rc.1.24452.12 🤷 not sure if people on linux/mac have tried that MSBuild version.
When I say fiddling what fixed it for me was building TUnit in Rider, since you have net 9 it forced Rider to switch MSBuild.
Might also explain why you don't get it in TUnit test project.
After a bit more fiddling looks like it might be something to do with MSBuild, I was using 8.0.303 but the issue went away when using 9.0.100-rc.1.24452.12 🤷 not sure if people on linux/mac have tried that MSBuild version.
When I say fiddling what fixed it for me was building TUnit in Rider, since you have net 9 it forced Rider to switch MSBuild.
Might also explain why you don't get it in TUnit test project.
Oh I know what this might be then. I recently upgraded the source generator libraries, and the .NET 8 compiler might not have the most up to date version, but .NET 9 does.
Tried the same project I got working on my windows using the latest TUnit version with MSBuild 9.0, on my Fedora laptop. Even after switching to the MSBuild 9.0.1 still no luck, also didn't work at version 8.0.303.
To clarify the project is still at .NET 8 I just used MSBuild 9.0.1. Not sure if that would effect the source code generation :shrug: I do not know enough about how MSBuild works.
@jacob7395 0.1.1096 should be working again on Windows on .NET 8
It seems to be working mostly now, I found an issue with using ClassConstructor's I'll write an example and open a separate issue.
I have not been able to get Test Discovery to work using Rider on MacOS. Any updates on this?
It's in jetbrain's hands
I am assuming this is also to do with jetbrains, but the test traceing is also not working for me. It discovers the test but if I double click on it don't direct me to the test file or test. I'll keep an eye on this issue, and update if it does or doesn't get resolved.
On Wed, 23 Oct 2024, 8:58 pm Tom Longhurst, @.***> wrote:
It's in jetbrain's hands
— Reply to this email directly, view it on GitHub https://github.com/thomhurst/TUnit/issues/576#issuecomment-2433318027, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFEEHKTPMCT6XQZQXOKB33Z475WHAVCNFSM6AAAAABOTK7A4KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZTGMYTQMBSG4 . You are receiving this because you were mentioned.Message ID: @.***>
I am assuming this is also to do with jetbrains, but the test traceing is also not working for me. It discovers the test but if I double click on it don't direct me to the test file or test. I'll keep an eye on this issue, and update if it does or doesn't get resolved. … On Wed, 23 Oct 2024, 8:58 pm Tom Longhurst, @.> wrote: It's in jetbrain's hands — Reply to this email directly, view it on GitHub <#576 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFEEHKTPMCT6XQZQXOKB33Z475WHAVCNFSM6AAAAABOTK7A4KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZTGMYTQMBSG4 . You are receiving this because you were mentioned.Message ID: @.>
This isn't in the standard release yet but is supported in the latest EAP.
HOWEVER, it seems to only work for non-parameterised tests.
If you have a data driven test it doesn't work for some reason.
JetBrains Rider About
Project setup
I created a new solution with a class library (using .NET 8.0.401) using TUnit 0.1.783 (but have also tried on 0.1.752):
Then I created the following class:
Running it via
dotnet test
appears to work:But the tests are not being discovered. I've already checked "Enable Testing Platform", and I've downgraded Rider to 2024.2.4, but hasn't worked.