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

AutoData attribute doesn't work with "NUnit Test Adapter" #419

Closed
olegsych opened this issue Jun 19, 2015 · 6 comments
Closed

AutoData attribute doesn't work with "NUnit Test Adapter" #419

olegsych opened this issue Jun 19, 2015 · 6 comments

Comments

@olegsych
Copy link
Contributor

The AutoData attribute doesn't work when tests are executed by the NUnit Test Adapter Visual Studio extension. Here is how I found out:

  • Install the NUnit Test Adapter extension using the Extension Manager in Visual Studio.
  • git clone https://github.com/AutoFixture/AutoFixture.git
  • devenv AutoFixture\Src\AutoFixture.NUnit2.sln
  • Ctrl+R, A or Test -> Run -> All Tests in Visual Studio.
  • All tests in Ploeh.AutoFixture.NUnit2.UnitTest.Scenario class fail.

I suspect a similar problem may exists for the NUnit Test Adapter NuGet package, however I haven't verified it.

  • Is this a known problem? I've looked at the discussion in the original pull request NUnit #158, but couldn't tell if this was meant to work.

As far as I can tell, NUnit has no intrinsic knowledge of the AutoDataAttribute and AutoFixture currently relies on the AutoFixture.NUnit2.Addins to make it work. The original pull request mentions the need to have NUnit installed with an MSI and have the AutoFixture.NUnit2.Addins.dll deployed in the C:\Program Files (x86)\NUnit 2.6.2\bin\addins directory.

  • Was the option of subclassing NUnit's TestCaseSourceAttribute considered as an alternative? This would require changing NUnit's ProviderReference to support passing the MethodInfo to the target method.
@ploeh
Copy link
Member

ploeh commented Jul 9, 2015

I can't answer any of these questions. If someone else (@gertjvr?) can, I'd appreciate the help.

@gertjvr
Copy link
Contributor

gertjvr commented Jul 22, 2015

You dont need nunit installed anymore should work OOTB, the required/missing dll was included in the extention, @olegsych what version of NUnit and NUnit Test Adapter are you using?

@olegsych
Copy link
Contributor Author

Latest version, released on visual studio gallery on 4/7.

@gertjvr
Copy link
Contributor

gertjvr commented Jul 22, 2015

@olegsych can you confirm your using the versions below?
NUnit 2.6.4
NUnit Test Adapter 2.0.0.0 - Targeting 2.6.4
Visual Studio 2013

@olegsych
Copy link
Contributor Author

Visual Studio Ultimate 2013 Version 12.0.40629.00 Update 5
NUnit 2.6.2, same problem occurs after upgrading to v2.6.4
NUnit Test Adapter 2.0.0.0 extension

@ploeh
Copy link
Member

ploeh commented Aug 31, 2015

Closing due to lack of activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants