Test case

De Software testing
Ir para: navegação, pesquisa

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>


Fact

  • 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>
  • 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.