testing: More restructuring for the Nose source
[swc-testing-nose.git] / testing / README.md
1 # Testing
2
3 ![image](media/test-in-production.jpg)
4
5 # What is testing?
6
7 Software testing is a process by which one or more expected behaviors
8 and results from a piece of software are exercised and confirmed. Well
9 chosen tests will confirm expected code behavior for the extreme
10 boundaries of the input domains, output ranges, parametric combinations,
11 and other behavioral **edge cases**.
12
13 # Why test software?
14
15 Unless you write flawless, bug-free, perfectly accurate, fully precise,
16 and predictable code **every time**, you must test your code in order to
17 trust it enough to answer in the affirmative to at least a few of the
18 following questions:
19
20 -   Does your code work?
21 -   **Always?**
22 -   Does it do what you think it does? ([Patriot Missile Failure][patriot])
23 -   Does it continue to work after changes are made?
24 -   Does it continue to work after system configurations or libraries
25     are upgraded?
26 -   Does it respond properly for a full range of input parameters?
27 -   What's the limit on that input parameter?
28 -   What about **edge or corner cases**?
29 -   How will it affect your [publications][]?
30
31 ## Verification
32
33 *Verification* is the process of asking, "Have we built the software
34 correctly?" That is, is the code bug free, precise, accurate, and
35 repeatable?
36
37 ## Validation
38
39 *Validation* is the process of asking, "Have we built the right
40 software?" That is, is the code designed in such a way as to produce the
41 answers we are interested in, data we want, etc.
42
43 ## Uncertainty Quantification
44
45 *Uncertainty quantification* is the process of asking, "Given that our
46 algorithm may not be deterministic, was our execution within acceptable
47 error bounds?" This is particularly important for anything which uses
48 random numbers, eg Monte Carlo methods.
49
50
51 [patriot]: http://www.ima.umn.edu/~arnold/disasters/patriot.html
52 [publications]: http://www.nature.com/news/2010/101013/full/467775a.html