L14: Software Testing Flashcards
What is software testing?
Testing is intended to
- show that a program does what it is intended to do
- discover program defects before it is put into use
Usually uses artificial data.
The results of the test run are checked for errors, anomalies or information about non-functional attributes.
Testing is part of a more general verification and validation process.
Testing can find errors but not prove their absence.
Formally specified tests replace extensive system specification documents in agile approaches.
What is verification and validation?
They can be used to establish whether the system is fit for purpose
Verification
- “Are we building the product right?”
- The software should conform to its specification
Validation
- “Are we building the right product?”
- The software should do what the user requires
What are some goals of testing?
- Demonstrate that software meets requirements
- System performs as expected given test cases
- Discover faults, undesirable behaviour
- Expose defects
What are some verification and validation methods?
- Walk-through
- Code review
- Inspection
- Formal methods
What is the difference between inspections and testing?
Inspections are concerned with the analysis of the static system representation to discover problems (static).
Testing is concerned with exercising and observing product behaviour (dynamic). System is executed with test data and operational behaviour is observed. (You actually run the code)
Testing looks at the program
Inspection looks at all the artefacts (requirements, architecture, UML, database schema, program)
Compare inspections and testing (adv/disadv.)
Inspections
- During testing, some errors can mask other errors
- Testing is not suitable for determining certain quality attributes
Testing
- Inspections are not suitable for finding errors due to unexpected interactions and timing/performance issues
- Small companies may not be able to find an independent inspection team
When do we test?
- Development
- Release
- Production (after deployment)
Who does the testing?
- Developers
- Quality Assurance team (test engineers)
- Domain experts
- Users
What are the types of testing?
Functional
- Unit, component, interface, integration, acceptance, system
Non-functional
- Performance, scalability, security, usability, accessibility
How can testing be performed?
We want to automate testing as much as possible.
Knowledge of internal structure
- Opaque (PKA black box)
- Transparent (PKA white box)
- Partially transparent (PKA grey box)
Automation
- Manual vs automated
What is development testing?
All testing carried out during development:
- Unit
- Component
- System
- Acceptance (for agile development)
What is unit testing?
- Testing the functionality of individual program units
- Units may be functions, methods, class
- Defect testing process
- Tests that component acts as expected
- Or show errors with abnormal inputs
What are some testing strategies?
Partition testing
- identify groups if inputs with common characteristics that should be processed in the same way, choose tests from each group
Path-based testing
- ensure path through the code under test is executed at least once
Guideline-based testing
- use testing guidelines to choose test cases
- guidelines can reflect commonly made/ previous errors
What is component testing?
- Testing the functionality of components as defined in well-defined component interfaces
- Software components are composite (made up of interacting components)
- Shows that each component behaves as expected
- Assumes unit testing on individual objects/components within the component have been testing
What is interface testing?
Aims to detect faults in interface
Interface types
- Parameter interfaces (data passed between methods)
- Shared-memory interfaces (memory shared between methods)
- Procedural interfaces
- Message passing interfaces