Verification & Validation Flashcards
What is the difference between verification and validation?
Validation: have we built the right system?
- check all requirements are satisfied;find missing funtionality
Verification; have we built the system right?
- check system behave correctly; check for consistency and completeness
3 methods of validation?
- Check every use case handled by system
- simulate system using CRC cards
- check use case scenarios using UML sequence diagram
3 goals of verification?
- prove models are correct before coding
- consistent
- complete
Describe breifly 4 different kinds of testing
- Unit testing; check each class works infdivually
- Integration testing; checks whole system works after assembly
- Regression testing; checks a system still works after modification
- Acceptance testing; is system intuitive for end-users?
What is the oracle problem?
- code based testing relies on seeing if anything unusual happens when executing code paths, but what is correct?
What is the oracle test?
-assumes code must conform to some correct specification
Describe 3 different testing strategies
Manual; user written tests
Random; tools randomly generate test sequences
Model-based; test sets generate automatically
What is testing coverage?
How much of the software is validated by the test set
3 different levels of software coverage that can be achieved by white-box testing?
- Full statement coverage; every program node
- Decision coverage; every program branch
- Condition coverage; every boolean sub-expression
2 methods of black-box testing
- equivalence partition testing; test all distinct sets of arguments that trigger different otucomes
- state-based testing; exercise the complete state space (reach every state and fire every transition)
How do we write positive and negative OCL tests using preconditions?
+ supply a test satisfying all preconditions
- supply a test violating each condition
How do we write positive and negative OCL tests using postconditions?
supply tests whose argument shsould trigger each kind of outcome
- supply tests whose inputs dont satisfy any of the postconditions
How do we write positive and negative OCL tests using invariants?
+ does invariant hold after construction?
- force object into an inconsistent state and evaluate
WHat method do we use to test from a state machine?
Generate test sequences to reach every state
Exercise every method once in every state
Check we reach the desired next state
What is meant by the state cover?
Set of shortest sequences that is guaranteed to reach every state (after reset)