Update: New version uploaded, same link with:
Also, for those not downloading in Chrome (and you know who you are), remember to change the suffix from zip to vsix.
Time for another preview! This time it’s a NEW PRODUCT!
Internally we call it Unit Test Code Review. And the name is really self explanatory.
It’s a VS 2010 extension (double click on the file and it installs). It’s very simple – the test code gets parsed, and analyzed according to rules. When a rule is broken, the offending line is marked, and an error appears in the Error List window. Double-click on the line, and you’ll get more information about the error, including a link to a corresponding webpage. No need to compile – it runs in the background.
Installation instructions:
- Double click on the vsix file to install it on VS2010
- Go to Tools->Options->Environment->Extension manager, and make sure the Load Per User checkbox is checked.
- Restart VS. (the final 2 steps are needed only once).
The currently supported rules are:
- No Asserts – There’s an error if in a test there is no Assert. If however, there’s an ExpectedException attribute on the test, it’s smart enough to know that an Assert is not needed, and you won’t get an error
- Multiple Asserts – Means you’re testing too much. There’s no error if you’re testing multiple asserts on the same objects, only on multiple objects.
- Avoid logic – If you’re using an if/else or switch/case in your test, this error pops.
We’d like to know what you think, and what other rules you think would be beneficial.
You can download the installation file here. Tell us what you think!