Test case
De Software testing
Concepts
- A test case is a pair consisting of test data (a set of values, one for each input variable) to be input to the program and the expected output. <bibref>mathur:2008, 18</bibref>
- A test case is a tuple (d, S(d)), where d ∈ D (and D is the input domain) and S(d) represents the expected output for the input d according to specification S. <bibref>vincenzi-etal:2007</bibref>, <bibref>vincenzi-etal:2007:slides</bibref>
- A test case is a 4-tuple < pre-conditions, input, expected output, execution order >. <bibref>vincenzi-etal:2007</bibref>, <bibref>copeland:2004</bibref>, <bibref>mcgregor:2007</bibref>, <bibref>vincenzi-etal:2007:slides</bibref>
- A test case is a 3-tuple <input, output, execution order>. <bibref>delamaro:slides:2009</bibref>
Fact
- To be more effective and efficient, test cases must be designed, not just slapped together. <bibref>vincenzi-etal:2007</bibref>, Input domain example
- There are two styles of test case design regarding order of test execution: cascading test cases and independent test cases. <bibref>vincenzi-etal:2007:slides</bibref>
- Test cases which reveal simple faults are also able to reveal complex faults. <bibref>vincenzi-etal:2007:slides</bibref>, <bibref>budd:1980</bibref>
- Test cases can be generated by solving a set of constraints. <bibref>vincenzi-etal:2007</bibref>
- Dependence analysis can be combined to mutation testing to generate test cases. <bibref>vincenzi-etal:2007</bibref>, <bibref>harman-etal:</bibref>
- It is difficult to define the expected output for a test case. <bibref>delamaro:slides:2009</bibref>, <bibref>vincenzi-etal:2007:slides</bibref>
- The design of test cases for software and other engineering products can be as challenging as the initial design of the product itself. <bibref>pressman:2006</bibref>
- Test cases must be designed so that they have the highest likelihood of finding the most errors with a minimum amount of time and effort. <bibref>pressman:2006</bibref>
- A test case fails when the generated output value. is different than the expected output value.
- A test case succeeds when the generated output value is equal to the expected output value.