TestCaseSource at the TestFixture level

141 views
Skip to first unread message

David Simmon

unread,
May 6, 2016, 3:51:36 PM5/6/16
to NUnit-Discuss
I'm starting to run some tests using NUnit ( 3.2.1.0 from NuGet ).  I've found the [TestCaseSource] attribute, which elegantly solves a concern with using NUnit for automated testing.   But I can't find a way to set something like the [TestCaseSource] at the [TestFixture]/class level.

Is there a way to configure this to "Run all of the tests in this fixture for test case value 1, then run them all for test case value 2" instead of "run test 1 for all test case values, then run test 2 for all test case values, etc"?

Thanks!

Rob Prouse

unread,
May 6, 2016, 3:54:20 PM5/6/16
to NUnit-Discuss
For fixtures, you want to use the TestFixtureSource which passes parameters to your class constructor allowing you to run all tests within your fixture multiple times.


--
You received this message because you are subscribed to the Google Groups "NUnit-Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nunit-discus...@googlegroups.com.
To post to this group, send email to nunit-...@googlegroups.com.
Visit this group at https://groups.google.com/group/nunit-discuss.
For more options, visit https://groups.google.com/d/optout.



--

Rob Prouse

 

I welcome VSRE emails. Learn more at http://vsre.info/

David Simmon

unread,
May 7, 2016, 10:52:31 AM5/7/16
to NUnit-Discuss
That is exactly what I was looking for, and way more elegant than what I was thinking.  Thank you!
Reply all
Reply to author
Forward
0 new messages