Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support MS Test 2 #340

Closed
xperiandri opened this issue Jan 14, 2017 · 13 comments
Closed

Support MS Test 2 #340

xperiandri opened this issue Jan 14, 2017 · 13 comments

Comments

@xperiandri
Copy link

{
  "version": "1.0.0-*",
  "testRunner": "mstest",

  "dependencies": {
    "MSTest.TestAdapter": "1.1.8-rc",
    "MSTest.TestFramework": "1.0.8-rc",
    "Microsoft.NETCore.App": {
      "version": "1.1.0",
      "type": "platform"
    },
    "dotnet-test-mstest": "1.1.2-preview",
  },

  "frameworks": {
    "netcoreapp1.1": {
      "imports": [
        "dnxcore50",
        "portable-net45+win8"
      ]
    }
  }
}
@kurtschelfthout
Copy link
Member

What doesn't work here? You should be able to use one of the portable FsCheck version.

@xperiandri
Copy link
Author

Even Property attribute?

@kurtschelfthout
Copy link
Member

No, but last time that was looked at mstest just doesn't support that kind of extensibility. You're better of using ThrowOnFailure.

Has this changed in MSTest 2?

If it's .NET core support you're after, that is being looked at separately: #293.

@xperiandri
Copy link
Author

It is related.
But my issue is about MS Test Framework 2 support.

@kurtschelfthout
Copy link
Member

Like I said, afaik MSTest has no extension points.

@kurtschelfthout
Copy link
Member

Since I don't really see how to support the wish here because of how MSTest works, I'm closing this.

@lukas-lansky
Copy link

lukas-lansky commented Jan 4, 2018

@kurtschelfthout I noticed MSTest v2 now has https://github.com/Microsoft/testfx-docs/blob/master/RFCs/003-Customize-Running-Tests.md . I played with it yesterday and it seems to me that by writing a proper implementation for ITestMethod.Invoke, something like FsCheck.xUnit's Property attribute can be done for MS Test.

If you agree, can we reopen this ticket? I would like to work on this.

@kurtschelfthout
Copy link
Member

Sure.

@xperiandri
Copy link
Author

@lukas-lansky do you have anything to present to the community?

@xperiandri
Copy link
Author

Is it possible on context of v3.0 release?

@kurtschelfthout
Copy link
Member

It's a separate project (like FsCheck.Xunt/NUnit) so it isn't related to any particular release or version - can be added at pretty much any time. Still have no plans or intention to work on this myself though.

@Andreas-Dorfer
Copy link
Contributor

I wrote an MSTest extension. It started out for private use, but I recently introduced it into one of my work projects too. Works well so far, but there are open issues.

Beware that it targets .net6 only. However, feel free to open an issue if there's the need to target other framework versions.

@kurtschelfthout
Copy link
Member

Thanks @Andreas-Dorfer! You are most welcome to add a few lines to FsCheck's docs, e.g. here: https://github.com/fscheck/FsCheck/blob/master/docs/index.fsx#L11

Andreas-Dorfer added a commit to Andreas-Dorfer/FsCheck that referenced this issue Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants