Macro to run one test

May 31, 2010 at 3:23 AM
Hey, thanks so much for statlight, it's been a great help for my team! We practice TDD, so I wrote a visual studio macro that allows you to run one test at a time, or all tests in a file at a time (when mapped to Ctrl+R,T it behaves just like other unit test runners). The macro is not perfectly reusable and will probably require tweaking for other teams, but I would like to share it because it has been extremely useful for my team, enabling us to do TDD with silverlight where it wasn't really practical before. (I also started converting this to a VS plugin, but have given up on getting the time to finish it, so if anyone wants that code, I'd be happy to share it as well).
May 31, 2010 at 5:35 AM

I'd be interested in looking at what you have (both macro & plugin)...

Not sure how you think might be the best way to share your code...,, (or upload it here as a patch?)

Jun 1, 2010 at 1:51 AM
Here's the macro. Obviously, the path to statlight could be pulled out into a variable for ease of changing, the other thing that could potentially need to be changed per project it's used in is the part that finds the xap filename. If it's not the same as the assembly name for the test project, a change would need to be made to the macro. As I said, the plugin is pretty much the same thing ported to C#. There's more to it, but the following is the main file with all the test-runner logic. Feel free to use any of it that might be useful, I'd love to see some of it integrated to expand usage of Statlight.