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

TestFixtureSource not supported #262

Open
KthProg opened this issue May 15, 2019 · 2 comments
Open

TestFixtureSource not supported #262

KthProg opened this issue May 15, 2019 · 2 comments

Comments

@KthProg
Copy link

KthProg commented May 15, 2019

The runner should allow NUnit to set up tests as normal, and then proceed to add timing functionality on top of this. When using a TestFixtureSource, I simply get an error about no parameterless constructor, when of course this is by design, and my tests can't run if the test fixture was created using a parameterless constructor.

@Aaronontheweb
Copy link
Member

Is this issue for NBench or NUnit? We don't have any kind of fixture support yet (although I'd really like to add it!)

@KthProg
Copy link
Author

KthProg commented May 15, 2019

NUnit supports a TestFixtureSource attribute, that creates an instance of the test class for each object you return as a source. The problem is, NBench expects an empty constructor, and instantiates the fixture from this. Hence, I can't use my test fixture with a test fixture source with NBench. Why not write NBench as a test adapter like NUnit3? And then build on top of the NUnit functionality? That way it would be consistent with all of their attributes, which can get pretty crazy and wildly complicate the actual number of tests.

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

2 participants