Talk:Automated Testing

From OpenSimulator

Revision as of 18:49, 10 December 2008 by SeanDague (Talk | contribs)

Jump to: navigation, search

I crossed out a paragraph about naming tests a certain way in order to make sure they're run in a certain order because they depend on each other. This is bad practice. All tests should be able to run independently of one another. For any environment setup, use the SetUp and TearDown NUnit attributes.

Mikem 01:01, 9 October 2008 (PDT)

I changed this back, because it's the way the unit tests work today. The "theory" that no test method should depend on any other one tends to force unit tests into very shallow coverage because you would need massive code duplication to test anything deep. My experience has shown that imposing the "no test should really on another test" generates much worse test cases.

If you want to go through the unit tests and adjust them to all have Setup and Teardown methods, be my guest. :) However it really just makes things much more difficult than they need to be, for lots of effort, and no real benefit.

Personal tools
General
About This Wiki