Unit Testing World Wind

From World Wind Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 21:24, 15 April 2005 (edit)
24.23.82.233 (Talk)
(A cunning plan...)
← Previous diff
Current revision (21:13, 21 August 2019) (edit) (undo)
F0urtyfive (Talk | contribs)
m (Reverted edits by Monday (Talk); changed back to last version by Mkpl)
 
(11 intermediate revisions not shown.)
Line 1: Line 1:
-Unit Tetsing World Wind+'''Unit Testing World Wind'''
------------------------+
I would like to float a proposal to start adding Unit Testing for any new features we add to World Wind. This isnt user or tester testing, unit tests is code and classes you add to a project to test that the code you write behaves as expected and can be tested and verified by automated tools. So if you check in changes a periodic build can build *and* test the code. I would like to float a proposal to start adding Unit Testing for any new features we add to World Wind. This isnt user or tester testing, unit tests is code and classes you add to a project to test that the code you write behaves as expected and can be tested and verified by automated tools. So if you check in changes a periodic build can build *and* test the code.
Line 17: Line 16:
**Testing GUI is hard. **Testing GUI is hard.
**Separation of concerns is hard to start doing (Large event methods - see WorldWindow.cs - _OnMouseDown) **Separation of concerns is hard to start doing (Large event methods - see WorldWindow.cs - _OnMouseDown)
 +
*Tools *Tools
Line 22: Line 22:
***TestDriven.NET ***TestDriven.NET
***MB.Unit ***MB.Unit
- 
**Automated Builds **Automated Builds
***Nant ***Nant
***Cruise Control.Net ***Cruise Control.Net
- +[[Category:Dev]]
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
-To help make World Wind as stable and bug free as possible we ask that Beta Testers check through the following list of items for bugs:+

Current revision

Unit Testing World Wind

I would like to float a proposal to start adding Unit Testing for any new features we add to World Wind. This isnt user or tester testing, unit tests is code and classes you add to a project to test that the code you write behaves as expected and can be tested and verified by automated tools. So if you check in changes a periodic build can build *and* test the code.

The pedantic form of writing tests is to write it *before* you write the actually code. I know it sounds odd, but think about it, you *have* thought through your classes and written some stuff down, you *do* know where you are gonna start, you *aren't* making it up as you go along are you? :) Writing tests before coding makes you stay honest with yourself.

  • Pros
    • Writing tests makes you think about what your code does and is it as simple as possible
    • Verifiable testing, CruiseControl.Net, Nant and many other tools can build and run the tests and give quick feedback about things that dont pass.
    • Regessions are (hopefully) spotted quickly
    • Produces better code.
  • Cons
    • Percieved increase in time it takes to write code. (Time spent answering questions and testing is not visible to developers)
    • Extra dependancy for the build.
    • Testing GUI is hard.
    • Separation of concerns is hard to start doing (Large event methods - see WorldWindow.cs - _OnMouseDown)


  • Tools
    • Unit Testing
      • TestDriven.NET
      • MB.Unit
    • Automated Builds
      • Nant
      • Cruise Control.Net
Personal tools