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?
What are some verification and validation 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?
Who does the testing?
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?
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?
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
What is system testing?
Compare system and component testing
What drivers can be used for system testing?
What are system testing policies?
Exhaustive system testing is impossible so testing policies which define the required system test coverage may be developed
Examples of testing policies
- All system functions that are accessed through menus should be
- Combinations of functions that are accessed through the same menu must be tested
- Where user input is provided, all functions must be tested with both correct and incorrect input
What is acceptance testing?
Used throughout agile, and at the end of plan-driven
Give us a way of saying that something is ‘done’.
What is test-driven development?
Test-driven development is a key component of most agile software development approaches.
What is regression testing?
What is release testing?
What is performance testing?