haf / expecto

A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!
Apache License 2.0
663 stars 96 forks source link

Rider Support? #326

Open varon opened 5 years ago

varon commented 5 years ago

Jetbrains has had the issue outstanding for 2 years now. https://youtrack.jetbrains.com/issue/RIDER-7172

Is there anything we can do on expecto's side to get stuff to work?

drhumlen commented 5 years ago

2nd. Would be very nice to have! Much needed, especially since Rider doesn't understand that let main argv is the last declaration in the compilation sequence: Screenshot 2019-05-07 at 16 25 47

auduchinok commented 4 years ago

@varon We've started working on adding Expecto support to Rider. It currently seems nothing needs to be added or changed in Expecto itself to get some initial tests running/debugging.

varon commented 4 years ago

GLORIOUS

drhumlen commented 4 years ago

@auduchinok : It may be a lot to ask, but will it also allow us to see coverage? That could be very useful

auduchinok commented 4 years ago

@drhumlen There're chances it will be able to get it (almost?) for free the same way we didn't have to do anything to get coverage working in F#. If it only requires implementing some simple Expecto-specific components then it'll be easy to address. We'll see. :)

drhumlen commented 4 years ago

@auduchinok. Cool! :) Do you have any ETA? (I'm using EAPs whenever available)

auduchinok commented 4 years ago

@drhumlen No estimates to share for now.

If you want some status updates, here're a test session results for the Expecto dotnet template, after run/debug:

Screenshot 2019-08-23 at 15 09 15

Now it needs more work in the discovery part.

ErikSchierboom commented 4 years ago

Any progress on getting expecto integrated into Rider? Really love both :)

auduchinok commented 4 years ago

@ErikSchierboom Yes, most of pre-requirements on F# plugin side are ready. We need to finish integration of inner tests discovery and some other things. It's likely it all can come to 2020.1 EAP, though, no particular promises for now, since it also needs changes in Rider itself. :)

ErikSchierboom commented 4 years ago

Great! Looking forward to it.

drhumlen commented 4 years ago

I'm suspecting that it's really hard for Rider to pinpoint the location of a test since Expecto by design is all about programmable flexible testing. With the other libraries, modules and their [<Fact>]-let bindings are unambiguously placed, but with expecto it can be anywhere.

If it doesn't make sense to add Expecto support to Riderr, that's ok. There are other more low-hanging fruits I'd rather have I think. 🤔

auduchinok commented 4 years ago

@fc1943s Sorry for no updates. We didn't move much forward during 2020.1 development cycle. Some of the changes on F# support side depend on a unit test infrastructure refactoring and it was postponed till 2020.2 AFAIK. I'm going to try working it around so in the worst case we could enable at least a limited support in 2020.2 if the unit tests refactoring is not done by that time.

varon commented 4 years ago

Thanks for the update @auduchinok. Really looking forward to this!

varon commented 3 years ago

Rider 2020.2 did some huge updates to the way testing is handled. @auduchinok do you know if this allows Expecto to work?

Edit: https://www.jetbrains.com/rider/whatsnew/#unit-testing

varon commented 3 years ago

@auduchinok bump

auduchinok commented 3 years ago

@varon Sorry for the delay. Yes, these changes were one of the most important things we've waited for in the plugin.

mdpedersen commented 3 years ago

Is there any update on ETA for this please?

lucasteles commented 3 years ago

Is there any update for this ?

varon commented 3 years ago

@lucasteles @marlinla @fc1943s @mdpedersen - Would be good if someone could give it a try.

Maybe things work now?

JacksonCribb commented 3 years ago

As of 2021.1 EAP9 Beta, there's still no support.

From Resharper release notes:

We’ve implemented support for VSTest adapters – a feature that allows you to discover and run tests from a third-party framework.

Unfortunately, Rider still won't recognise the test project. Note, this is listed in the Resharper release notes, so there may be some work still needed on the Rider side, and I'm jumping the gun.

Looks like we could be close though!

@auduchinok What blockers are remaining on this?

C0DK commented 1 year ago

I just want to bump this - as this is one of the blockers for me atm.

nikolamilekic commented 1 year ago

@C0DK Rider integration works for me with these two packages installed in the test project:

Microsoft.NET.Test.Sdk
YoloDev.Expecto.TestSdk

Did you try that?

SimonCropp commented 1 year ago

@C0DK also try "Enable VSTest adapters support" image

ghost commented 1 year ago

@SimonCropp enabling VSTest adapters worked for me with 2022.2.3

SimonCropp commented 1 year ago

@awbv glad u got it working

anpin commented 1 year ago

above steps doesn't work for me targeting net7.0 with rider 2022.3 EAP9. I can do dotnet test from the solution dir, but sadly rider is showing me image

arialdomartini commented 11 months ago

Same for me with 2023.2 on .NET 7, Linux. I installed both

Microsoft.NET.Test.Sdk
YoloDev.Expecto.TestSdk

and enabled VSTest adapters support, but the discovery finds nothing.

arialdomartini commented 11 months ago

I just tried with Windows and both .NET 7 and .NET 6. Enabling VSTest adapters support it works perfectly!

image

poroburu commented 10 months ago

I have VSTest adapters support enabled and the Expecto.Sample tests are not being discovered in Rider 2023.2 on Windows.

I also tried adding the *Sample* or *Expecto.Sample* mask which did not make a difference.

SimonCropp commented 4 days ago

@arialdomartini

you need YoloDev.Expecto.TestSdk and not Microsoft.NET.Test.Sdk. and <OutputType>Exe</OutputType>

@poroburu is the above the setup what you have?