Week 9 Flashcards
What is the difference between validation testing and defect testing?
Validation testing: ensures system meets clients expectations
Defect testing: detects defects and problems
What is the difference between black and white box testing?
Black-box: from outside, just public methods (user view)
White-box: from inside, considering all aspects (programmer view)
what are 3 examples of algorithmic faults?
Missing initialization
Incorrect branching condition
Missing test for null
What is an example of a mechanical fault?
Operating temperature outside equipment specification
What are 3 examples of an error?
Null reference error
Concurrency errors
Exceptions
What are the 3 levels of testing?
Level 1 - Test modules (classes), programs and “suites”
Level 2 - “Alpha” - Execute programs in simulated environment and test input and output
Level 3 - “Beta” - Test in a live user environment and test for response times, performance under load and recovery from failure
What are the 6 types of test in the hierarchy?
Unit test
Integration test
Function test
Performance test
Acceptance test
Installation test
The only type of testing that is not undertaken by the programmers is _____ testing.
This is done by _____________.
Acceptance testing
The client
What is the difference between unit testing and integration testing?
Unit testing tests individual methods with stubs for any interfaces - white box
Integration testing tests a system of integrated components up to the whole program - black box
What are the two approaches to integration testing?
Top-down testing - start with high level and replace individual components with stubs where appropriate
Bottom-up testing - Integrate individual components, replacing the stubs until the complete system has been tested
What is functional testing?
Tests each function against its functional requirement. Not concerned with internals as long as it works.
What is performance testing?
Test the program’s use of resources and time
What is stress testing?
Test the system beyond its maximum design load
See how it copes/recovers if things fail
What is regression testing?
Rerunning all previous tests after applying changes
What is acceptance testing?
Tests against the client’s requirements in a test facility
What is installation testing?
Execute in target environment with configuration etc.
Re run all previous tests
What is the goal of unit testing and integration testing?
Unit testing - to ensure the component is correctly coded
Integration testing - test the interfaces between the subsystems
What type of behaviour is the focus of black box testing?
I/O behaviour - testing to ensure input gives correct output
How can the number of test cases in black box testing be reduced?
Equivalence partitioning - dividing inputs into equivalence classes and testing from each class
e.g. one negative number is enough to test that negative numbers work
If an input is valid across a range of values, 3 types of value should be tested:
Below the range
Within the range
Above the range
What are the 4 elements in unit testing
Cases
Driver
Oracle
Stubs
What are the components of a test case?
Set of input data
Expected results
What are the steps in test driven development?
Add a test
Run test to ensure it fails
Update functional code to ensure it passes
re run and keep updating functional code until tests pass
refactor and move on
What are the benefits of Test driven development?
Shortens programming feedback
Provides detailed executable specifcations
promots high quality code
provides concrete evidence the code works
requires developers to prove it with code
provides finely grained feedback within minutes
ensures design is clean
supports evolutionary development
Test driven development implies ________________ methodology