I am trying to create a MSTest to crawl a web site. I want it to be dynamic, so I can just throw it into a build for any of our sites. It's basically a step to test before pushing to a staging environment. It checks for broken links and missing resources. Our unit tests are done in MSTest currently. We're using Bamboo to do our automated builds and tests. It has a nice format for results. I want to be able to see each item as a test with the details. That's easy enough in itself. I have all the code I need to crawl the web site.
How do create a method with the attribute TestMethod on the fly and include it in the test? Right now, I have a test method for the four types of resources I am looking for, so there are four test methods. I want to test method for each unique item.
I have been looking at DynamicMethod, but I don't think that will get me to where I want to be.