views:

362

answers:

2

I'm using QUnit to test some JQuery, and I've got Watin to load up the test page and parse out the test results, but I'm wondering if there's a way to dynamically generate the tests from the page using the MS Test suite rather than having to write a Test function for each test?

I'm just trying to reduce the amount of code having to be written

+1  A: 

I'm not sure how you use/run your tests but i'me pretty sure you could use some code generator like the t4 in visual studio to write those tests for you.

vitorsilva
+1  A: 

You could do this by using a custom test type that would know how to enumerate the tests dynamically somehow. You could associate a file extension with a TiP (test information provider), what when it loaded that file would use data in there to return the set of tests.

dhopton