Grumping about unit testing using VS 2005
I’m writing this hoping that someone could explain me
some of the weird things that are
going on in there:
- No way to run just one test
     without knowing its full name? I’m sitting in front of a test called
     LoadTest. Every class in the DAL has such a test. I need to type the full
     name of the class just to get something that in TestDriven I can do by
     right click and selecting “Run Tests”.
- What is going on with Expected
     Exception and AssemblyInitalize?
     The two posts should explain what is going on there, but basically both of
     these features are horribly broken.
- What is going on with sometimes
     building the application when I run a test and sometimes not building it. Invariably
     it doesn’t build after I saw a test failing, change my code, and
     then I’m left scratching my head wondering what the hell happened
     there.
Things that I really like about it:
- Run all the tests, you get some
     broken ones. Run the test again, only the previously failed tests are
     running. This is a pretty good way to get trimming away test case failures
     without running the full suite over and over again. In many case we are
     talking about significant speed advantage.
- Generate good test code that I
     can later modify. Sure, it generates a method per overload, and that about
     it. But it makes sure that I don’t forget about anything while I
     work my way down the list of generated tests. I often turn a dozen tests
     into a single one. (There really isn’t any need to test simple
     properties more than once, now is there?)
 

Comments
Comment preview