|
[Note]
This part includes how to design test cases and how to be a good test case
Test design is a multi-dimensional challenge
Test combines techniques that focus on:
· Tester: who does the testing
· Coverage: what gets tested
· Potential problems: why you are testing
· Activities: how you test
· Evaluation: how to tell whether the test passed or failed
Test case definition:
· Focus on procedure: A set of test inputs execution conditions and expected results developed for a particular objective, such as to exercise a particular program path or to verify compliance with a specific requirement
· Focus on the test idea: A test idea is a brief statement of something that should be tested, for example, if you are testing a square root function, one idea for a test would be ‘test a number less than zero’. The idea is to check if the code handles an error case.
· A test case is a question you ask of the program
Test attributes: Good test have these attributes
· Power: when a problem exists, the test will reveal it.
· Valid: when the test reveals a problem, it is a genuine problem.
· Value: it reveals things your clients what to know about the product or project.
· Credible: your client will believe that people will do the things that are done in this test
· Representative: of events most likely to be encountered by the use.
· Motivating: your client will want to fix the problem exposed by this test.
· Performable: it can be performed as designed
· Maintainable: easy to revise in the face of product changes
· Repeatable: it is easy and inexpensive to reuse the test
· Pop: it reveal things about our basic or critical assumptions
· Coverage: it exercises the product in a way that is not already taken care of by other tests
· Easy to evaluate
· Supports troubleshooting: provides useful information for the debugging programmer
· Appropriately complex: as the program gets more stable, you can hit it with more complex tests and more closely simulate use by experiences users
· Accountable: you can explain justify and prove you ran it.
· Cost: this includes time and effort as well as direct costs.
· Opportunity cost: developing and performing this test may prevent you from doing other test.
Test techniques
· Analyze the situation
· Model the test space
· Select what to cover
· Determine test oracles
· Configure the test system
· Operate the test system
· Observe the test system
· Evaluate the test results
Eleven dominating techniques
· Domain testing
· Risk-based testing
· Scenario testing
· Function testing
· Specification-based testing
· Regression testing
· Stress testing
· User testing
· State-model based testing
· High volume automated testing
· Exploratory testing |
|