Geeks With Blogs
Ex nihilo nihil fit (Alter Ego) Victor Hurdugaci's Alter Ego

If you used mstest and NUnit you might be aware of the fact that the former doesn't support dynamic, data driven test cases. For example, the following scenario cannot be achieved with the out-of-box mstest: given a dataset, create distinct test cases for each entry in it, using a predefined generic test case.

The best result that can be achieved using mstest is a single testcase that will iterate through the dataset. There is one disadvantage: if the test fails for one entry in the dataset, the whole test case fails.

So, in order to overcome the previously mentioned limitation, I decided to create a text template that will generate the test cases for me. As an example, I will write some tests for an integer multiplication function that has 2 bugs in it:

Read more >>

[Cross post from victorhurdugaci.com]

Posted on Saturday, March 5, 2011 7:30 PM Microsoft | Back to top


Comments on this post: Dynamic tests with mstest and T4

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Victor Hurdugaci | Powered by: GeeksWithBlogs.net