Software Test Principles

This is an excerpt from book the art of software testing

Testing is the process of executing a program with the intent of finding errors

program testing is more properly viewed as the destructive process of trying to find the errors in a program (whose presence is
assumed). A successful test case is one that furthers progress in this direction by causing the program to fail.

black-box testing (also known as datadriven or input/output-driven testing).

To use this method, view the program as a black box. Your goal is to be completely unconcerned about the internal behavior and structure of the program. Instead, concentrate on finding circumstances in which the program does not behave according to its specifications.

exhaustive testing is out of the question, the objective should be to maximize the yield on the testing investment by maximizing the number of errors found by a finite number of test cases. Doing so will involve, among other things, being able to peer inside the program and make certain reasonable, but not airtight, assumptions about the program

white-box (or logic-driven) testing

examine the internal structure of the program. This strategy derives test data from an examination of the program’s logic (and often, unfortunately, at the neglect of the specification). exhaustive path testing (execute, via test cases, all possible paths of control flow through the program)

flaw:

the number of unique logic paths through a program could be astronomically large

an exhaustive path test in no way guarantees that a program matches its specification.

a program may be incorrect because of missing paths.

an exhaustive path test might not uncover data-sensitivity errors.

1. A necessary part of a test case is a definition of the expected output or result.

//development team need to meet project schedule, so they are not able to do complete test.
2. A programmer are not able not test his or her own program thoroughly (testing is more effective and successful if someone else does it)
3. A programming organization are not abble to test its own programs thoroughly (it is more economical for testing to be performed by an objective, independent party)

 

4 Any testing process should include a thorough inspection of the results of each test.
5 Test cases must be written for input conditions that are invalid and unexpected, as well as for those that are valid and expected.
6 Examining a program to see if it does not do what it is supposed to do is only half the battle; the other half is seeing whether the program does what it is not supposed to do.
7 Avoid throwaway test cases unless the program is truly a throwaway program (regression testing)
8 Do not plan a testing effort under the tacit assumption that no errors will be found.
9 The probability of the existence of more additional errors in a section of a program is proportional to the number of errors already found in that section.
10 Testing is an extremely creative and intellectually challenging task.

 

posted on 2016-04-10 17:29  AlphaGo  阅读(84)  评论(0)    收藏  举报