Structural testing

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

Concepts

  • Structural testing is a technique based on the internal paths, structure, and implementation of the software under test. <bibref>vincenzi-etal:2007:slides</bibref>, <bibref>vincenzi-maldonado:slides:2007</bibref>

Facts

  • Structural testing is also known as white box testing. <bibref>vincenzi-etal:2007:slides</bibref>
  • Structural testing requires detailed programming skills. <bibref>vincenzi-etal:2007:slides</bibref>, <bibref>vincenzi-maldonado:slides:2007</bibref>
  • Structural testing, when applied at the unit testing phase, may involve paths that are within a module. <bibref>vincenzi-etal:slides:2007</bibref>, <bibref>vincenzi-maldonado:slides:2007</bibref>
  • Structural testing, when applied at the integration testing phase, may involve paths that are between modules within subsystems and paths between subsystems within systems. <bibref>vincenzi-etal:slides:2007</bibref>, <bibref>vincenzi-maldonado:slides:2007</bibref>
  • Structural testing, when applied at the system testing phase, may involve paths that are between entire systems. <bibref>vincenzi-etal:slides:2007</bibref>, <bibref>vincenzi-maldonado:slides:2007</bibref>
  • The number of execution paths may be so large that they cannot all be tested. <bibref>vincenzi-etal:slides:2007</bibref>, <bibref>vincenzi-maldonado:slides:2007</bibref>
  • The test cases chosen may not detect data sensitivity errors. <bibref>vincenzi-etal:slides:2007</bibref>, <bibref>vincenzi-maldonado:slides:2007</bibref>, Data sensitive error
  • Structural testing assumes that the control flow is correct (or very close to correct). Since the tests are based on the existing paths, nonexistent paths cannot be usually discovered through structural testing. <bibref>vincenzi-etal:slides:2007</bibref>, <bibref>vincenzi-maldonado:slides:2007</bibref>
  • Structural testing has efficacy on determine logical or programming faults in the PUT, specially at the unit level. <bibref>vincenzi-etal:slides:2007</bibref>, <bibref>vincenzi-maldonado:slides:2007</bibref>
  • Structured testing is based on the pioneering work of McCabe. <bibref>vincenzi-maldonado:slides:2007</bibref>


Procedures

  • The basic steps of application are:
  1. The PUT’s implementation is analyzed.
  2. Paths through the PUT are identified.
  3. Inputs are chosen to cause the PUT to execute selected paths. This is called path sensibilization.
  4. Expected outputs for those inputs are determined.
  5. The tests are run.
  6. Actual outputs are compared with the expected outputs.
  7. A determination is made as to the proper functioning of the PUT. <bibref>vincenzi-etal:slides:2007</bibref>, <bibref>vincenzi-maldonado:slides:2007</bibref>