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

Expecto in VS 2019 test explorer window #401

Open Evangelink opened 3 years ago

Evangelink commented 3 years ago

Hi there,

I guess most people have dropped VS but I am curious to know if someone knows how to integrate expecto tests in VS Test Explorer window. The readme recommends to use Expecto.VisualStudio.TestAdapter which appears to be deprecated and the YoloDev.Expecto.TestSdk replacement does not seem to be working.

jackfoxy commented 3 years ago

I use YoloDev.Expecto.TestSdk it works

inosik commented 3 years ago

You might need to install the Microsoft.NET.Test.Sdk package as well.

Evangelink commented 3 years ago

I still can't see it but it does work when using a simple project as test. I will post a repro (or close the ticket) when I will figure out what's wrong with my main solution.

inosik commented 3 years ago

What is the target framework of your test project? I vaguely remember that projects targetting .NET Framework didn't work when I tried to use dotnet test and the VS test explorer.

Evangelink commented 3 years ago

My main project is on net48 because of some third-party, I have seen that Yolo was requiring netcoreapp2.1+ so I have tried to have one of the test project (not needing the third-party reference) to target netcoreapp3.1 but without success.

xperiandri commented 1 year ago

Work perfect for me in VS 2022

    <!-- Wildcard does not work for Microsoft.NET.Test.Sdk,
    tests are not recognized by VS Test Explorer because version does not resolve -->
    <PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.6.0" />
    <PackageReference Update="YoloDev.Expecto.TestSdk" Version="0.*" />