Comments (14)
I started getting this message after installing the adapter. It affected all solutions, not just the one where I installed the adapter (using paket). The problem persists even through multiple reboots. The install seems to be changing something global. (Was using VS2017 community with F# nightly on Win10.)
from expecto-adapter.
Even uninstalling and re-installing VS2017 didn't fix this.
from expecto-adapter.
One more bit of info - it affects solutions which use a custom FSCheck Generator. (Even those which didn't have the adapter installed and haven't been changed in any way before it was installed in another project). But it doesn't affect test discovery in solutions which don't use a generator.
from expecto-adapter.
I wanted to check that what I said was true - that this affects projects other than the one where the adapter was installed. So I've just created a brand new project, installed just FSCheck and the FSCheck adapter (but not the Expecto adapter), and added this code:
namespace ExpectoRepro
open Xunit
open FsCheck
open FsCheck.Xunit
module public Generation =
type ShortString = ShortString of string
with
override this.ToString() =
match this with ShortString s -> s
type Generators =
static member ShortString() =
Arb.Default.String()
|> Arb.filter (fun s -> s <> null)
|> Arb.filter (fun s -> s.Length < 10)
|> Arb.convert ShortString string
[<PropertiesAttribute(Arbitrary = [| typeof<Generation.Generators> |]) >]
module Tests =
open Generation
[<Property>]
let ``A short string is short`` (ShortString s) =
s.Length < 10
When I built with VS's test explorer open, I again got:
------ Discover test started ------
[xUnit.net 00:00:00.6119947] Discovering: ExpectoRepro
'vstest.discoveryengine.x86.exe' WCF communication channel unavailable. Active request will be aborted.
========== Discover test finished: 0 found (0:00:04.3804718) ==========
This style of project was working perfectly before I first installed the Expecto adapter. It seems that something in the adapter itself, in paket, or in Visual Studio, is making a permanent global change which breaks all projects which use FSCheck Generators. I've uninstalled and reinstalled VS2017 three times and rebooted several times.
from expecto-adapter.
When I open the project from the previous comment in VS2015 (as opposed to 2017) I get the same error. So it seems that whatever got changed is at the machine level rather than the VS level.
from expecto-adapter.
This works fine on the ExpectoRepro project:
vstest.console.exe "C:\Users\kitea\Documents\Visual Studio 2017\Projects\ExpectoRepro\ExpectoRepro\bin\Debug\ExpectoRepro.dll"
So there is nothing inherently wrong with the test DLL.
from expecto-adapter.
To clarify, my issue, which only happens when I use FsCheckConfig.arbitrary, is with Visual Studio 2015.
from expecto-adapter.
I just upgraded my project to FSharp.Core 4.4.1
Still using VS 2015
And the test adapter still works so long as I don't try to map custom generators to arbitrary (so I have to test with the custom generators using the more verbose Prop.forAll
Anyway it it's any help my pakek.lock file reports the following for Expecto components:
Expecto (4.2.1)
Argu (>= 3.7)
FSharp.Core (>= 4.1.12)
Mono.Cecil (>= 0.9.6.4)
Expecto.BenchmarkDotNet (4.2.1)
BenchmarkDotNet (>= 0.10.5)
Expecto (>= 4.2.1)
FSharp.Core (>= 4.1.12)
Expecto.FsCheck (4.2.1)
Expecto (>= 4.2.1)
FsCheck (>= 2.8)
FSharp.Core (>= 4.1.12)
Expecto.VisualStudio.TestAdapter (4.0.0-alpha007) - version_in_path: true
Expecto (>= 4.0 < 5.0)
from expecto-adapter.
All my tests also run perfectly in NCrunch. It does seem to be very specific to the combination of having installed the adapter, and having a generator.
Doing a paket uninstall on the adapter didn't fix it incidentally.
from expecto-adapter.
I'm having the same problem... and I also try to find where it comes from...
@misterspeedy , when running on NCrunch, which runner are you using ?
I was wondering whether it could be something that is usually fixed by binding redirects... If the adapter is trying to load a library with a version mismatched that is resolved when running the expecto projet by a binding redirect, it could be failing to load ??
from expecto-adapter.
I re-tested this with adapter 5.0.0.2 and FSharp.Core 4.2.3 and the same problem persists.
I cleaned-up my test branch "testadapter" at https://github.com/jackfoxy/PersonalServer/tree/testadapter if someone feels inspired to try debugging.
from expecto-adapter.
I've got the same problem but with a different error message: "The active test discovery was aborted. Reason: Process is terminated due to StackOverflowException.".
The problem occurs when trying to change the arbitrary value of FsCheckConfig.
This could be reproduced easily with Expecto example about property based testing where they override arbitrary of the config.
This bug prevents us from using FsCheck and Visual Studio Test Explorer at the same time.
from expecto-adapter.
I've made a pull request which fixes this issue. Anyone want to give it a test?
from expecto-adapter.
@olivercoad I'm interested in testing. I need to check if my test case still results in the problem.
from expecto-adapter.
Related Issues (20)
- It seems like we get a "lock" on the test exe HOT 46
- MissingMethodException Void ExpectoConfig..ctor(...) HOT 5
- Expect.equal stops discovery HOT 4
- Parameter count mismatch in Discovery HOT 3
- Using the simple "test" blocks result display HOT 4
- No worky HOT 1
- 5.0.1 missing on nuget HOT 4
- Method not found: Void ExpectoConfig..ctor HOT 12
- netcoreapp vs netstandard story HOT 3
- adapter does not work with dotnetcore sdk project files HOT 5
- Method not found: 'Boolean ExpectoConfig.get_allowDuplicateNames() HOT 2
- Expecto config change for log name HOT 2
- Unable to discover any tests HOT 8
- Support .net core related projects
- Tests vanish after being run HOT 3
- Method not found in ExpectoConfig..ctor HOT 2
- Support for Newtonsoft.Json 11 & 12 HOT 6
- Adapter broke with Expecto 8.10 HOT 2
- No tests found to run for netcore2.1 app in Visual Studio 2019 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expecto-adapter.