mathnet-symbolics icon indicating copy to clipboard operation
mathnet-symbolics copied to clipboard

No tests shown in Test Explorer

Open diluculo opened this issue 8 years ago • 11 comments

Today I updated my local master with the latest origin/master. However, there are no tests in the Test Explorer of Visual Studio. I did followings: git fetch upstream git rebase upstream/master and then run restore.cmd in the Command Prompt

Am I missing something? Is Expecto.VisualStudio.TestAdapter needed to be installed?

diluculo avatar Nov 20 '17 05:11 diluculo

If you want to see running tests in The Test Explorer VS then yes you need it (I'm never used Expecto.VisualStudio.TestAdapter although). But you can run tests without it like console app.

FoggyFinder avatar Nov 20 '17 08:11 FoggyFinder

I think Test Explorer makes our life easier. Is it possible to add the TestAdapter to the solution? I found this.

diluculo avatar Nov 20 '17 09:11 diluculo

I've added the test adapter. The tests now do show up in the test explorer on my machine. Does that work for you?

I've noticed that the test project now takes quite some time to compile. Not sure why exactly, but it seems to correlate with the switch to Expecto.

cdrnet avatar Nov 20 '17 20:11 cdrnet

at least, it doesn't work for me. Adapter couldn't find any suitable tests.

FoggyFinder avatar Nov 20 '17 21:11 FoggyFinder

Even after rebuilding the test project?

cdrnet avatar Nov 20 '17 22:11 cdrnet

In the Command Prompt, everything is OK. But at rebuilding on VS 2017 15.4.4, I got an error in the Tests Output: System.ArgumentException: An item with the same key has already been added.

Details of the error are here

Related issues may be #28 of adamchester/expecto-adapter and #425 of jbevain/cecil.

diluculo avatar Nov 21 '17 02:11 diluculo

In theory this should not affect us, since we already use Cecil 0.10-beta7. I also cannot repro yet on my side (works for me after restarting VS and rebuilding the test project). I wonder what is different between our setups.

Switching to FCS (instead of the system installed F# compiler) could remove one potential difference; I intended to do that anyway.

cdrnet avatar Nov 21 '17 06:11 cdrnet

I've just tried it on another machine and it worked as well, in VS 2017 15.4.4, 15.5 preview 4 (after installing the test tools) and also on VS 2015.

cdrnet avatar Nov 21 '17 07:11 cdrnet

But at rebuilding on VS 2017 15.4.4, I got an error in the Tests

The same error

FoggyFinder avatar Nov 21 '17 07:11 FoggyFinder

If the change to FCS doesn't not help, I may have to revert. For me, no longer needing a test runner in the fist place makes things more straight forward, direct and simpler (especially also looking forward supporting .Net Standard). But it is important that this works for all contributors.

cdrnet avatar Nov 22 '17 09:11 cdrnet

When starting UnitTests, an Exception panel appears on the problematic line and I can edit it. For me, it is easy and much more intuitive.

exceptions

diluculo avatar Nov 22 '17 10:11 diluculo