08 Software Non Functional Requirements Flashcards
what are the coverage metrics
- statement coverage
- detect bug in a statement only by executing statement - branch coverage
- all branch in software should be executed once - path coverage
- all execution path should be executed once
what is statement coverage
- assess quality of test by measuring how each of code statement is executed
- target 100%
- statement coverage = number of executed statements/ total number of statements
what is branch coverage
- test all possible branches
- branch coverage = number of executed branches/ total number of branches
- 100% branch coverage does not mean that all bugs are detected
what is path coverage
- test all possible paths
- path coverage = number of executed paths/ total number of paths
- total independent path calculated by cyclomatic complexity number
- path coverage leads to more thorough testing
Drivers and stubs
driver calls (module under test) calls (stub)
drivers simulate module that calls the module under test
stubs simulates the behaviour of component used by the module under test
integration test strategy
- integration plan specify order to combine modules into partial system
- different approaches
- top down
- bottom up
- sandwich
- big bang
top down approach
- start with root module
- test using stubs to replace missing modules
- 1 driver to call root module
- add one or more called modules one by one and provide new stubs
- continue until all modules are tested
top down approach pros/cons
pros
1. early verification of high level behaviour
2. only one driver is needed
3 modules can be added one at a time
4. supports both depth first, breadth first approach
cons
1. need many stubs
bottom up approach
- reverse of top down
2. start with end module, add driver
bottom up pros/cons
pros
- early verification of low level behaviour
- no stubs needed
cons
1. root tested the last
sandwich approach
- comprise of bottom up and top down
2. simultaneously begin bottom up and top down and meet at predetermined part in the middle
sandwich pros/cons
pros
- parallel testing
- time saving
- suitable for large systems
big bang approach
- every module tested in isolation
2. after all modules tested, then integrate together at once and tested
big bang pros/cons
pros
- no driver or stub is needed
- minor planning
- suitable for small systems
cons
1. hard to isolate bugs
functional requirements
- how system should react to input
- what inputs should it accept
- what output should it provide
- what data should it store
- what computation will it perform