Possibility to parameterize TestFixtures like Tests.

Asked by Neredera

Is there a way to define parameters/variations for TestFixtures like it is possible for tests with e.g. the TestCaseAttribute?

A use case would be to run a test suite several times with different database engines or different databases.

To use more TestCaseAttributes is not possible in this case because the fixture setup takes a long time (restore an initialize database).

Something like a 'TestFixtureCaseAttribute' would be great.

Instead of argument for the test method, it could set properties on the instance of the testfixture.

Regards

Question information

Language:
English Edit question
Status:
Solved
For:
NUnit V2 Edit question
Assignee:
No assignee Edit question
Solved by:
Charlie Poole
Solved:
Last query:
Last reply:
Revision history for this message
Best Charlie Poole (charlie.poole) said :
#1

Yes, this is possible. See http://nunit.org/index.php?p=testFixture&r=2.6 under the heading "Parameterized Test Fixtures."

Revision history for this message
Neredera (neredera) said :
#2

Thanks a lot, i missed that.
This exactly solves my problem.

Regards

Revision history for this message
Neredera (neredera) said :
#3

Thanks Charlie Poole, that solved my question.