110 likes | 407 Vues
Software Testing. Component testing Testing of individual program components Usually responsibility of developer Tests derived from developer’s experience Integration testing Testing of groups of components integrated to create system or sub-system
E N D
Software Testing • Component testing • Testing of individual program components • Usually responsibility of developer • Tests derived from developer’s experience • Integration testing • Testing of groups of components integrated to create system or sub-system • Responsibility of independent testing team • Tests based on a system specification Ch.20 - Software Testing II
Integration Testing • Problem: Localizing errors found • Strategy: Incremental approach to integration and testing • Issue: What are the increments? Ch.20 - Software Testing II
Incremental Integration Testing Test 1 Module A Test 2 Module B Test 3 Ch.20 - Software Testing II
Incremental Integration Testing Test 1 Module A Test 2 Module B Test 3 Test 4 Module C Test 5 Ch.20 - Software Testing II
Incremental Integration Testing Module D Test 6 Test 1 Module A Test 2 Module B Test 3 Test 4 Module C Test 5 Test 7 Ch.20 - Software Testing II
Puncturing the Balloon It’s never that simple! • Components/tests rarely so “partitionable” • Multiple components may need to be incrementally added together • Tests may reveal errors in established (tested) components that were not completely exercised before • Bug fixes may effect multiple components Ch.20 - Software Testing II
Top-down Testing • Integrate/test high-level components, with stubs for subcomponents • Integrate/test next highest level, incrementally • Repeat until “bottom” reached stub (n.) – Same public interface, limited functionality (“Potemkin Village”) Ch.20 - Software Testing II
Bottom-up Testing • Integrate/test low-level components, using special testing drivers written at that interface level • Integrate/test next highest level, writing new testing drivers for that level • Repeat until “top” reached Ch.20 - Software Testing II
Top-down vs. Bottom-up • Top-down • more like to discover architectural design problems early • Positive feedback from limited, but working, system (“Bells and whistles”) • Bottom-up • Easier to test (no need to write stubs), but… • Test observation a problem with both Ch.20 - Software Testing II
Top-down vs. Bottom-up • Reality: • Both stubs and testing drivers require extra work • Mixture of both strategies employed Ch.20 - Software Testing II
Stress testing • Exercises system beyond its maximum design load • Stressing system test failure behaviour • Systems should not fail catastrophically • Checks for unacceptable loss of service, data • Particularly relevant for testing • servers • systems distributed across network Ch.20 - Software Testing II