Software Testing (WK9) Flashcards
Testing vs debugging
Testing tries to prevent bugs, debugging tries to fix bugs (that may have been revealed during testing)
Verification and validation in testing
Verification: are we building the product right
Validation: are we building the right product
V&V aims to establish confidence that the system is ‘fit for purpose’ or good enough for its intended use.
What is Unit testing?
Independently testing smaller building blocks of a program (eg. classes and methods).
- bottom-up approach
- small blocks easier to debug
- possible to run tests in parallel
- easy to automate
What is integration testing?
Full system testing, good for performance testing
Unit testing vs Integration testing
If a test uses:
- a database
- the network
- an external system
- reads/writes files or performs other I/O
Then its an integration test and not a unit test
What is blackbox testing
Functional testing. Identify input values for test cases based on specified behaviour.
- Try a heap of things until it breaks.
Implementation not needed to design the test cases. Good for identifying missing logic.
What is white box testing
Structural testing. Identify input values for test cases based on implementation. You have knowledge of what’s underneath. Can be automated
What are Representative values?
Try select values that are likely to reveal bugs. Test values are usually representatives of equivalence class. Each specified condition induces an equivalence class with corresponding valid and invalid ranges.
What are boundary cases?
Values that encompass the boundary of valid and invalid
What is partition testing?
Identifying groups of inputs with similar processing and characteristics. You should choose tests from each of these groups (partitions)
What is system testing?
A test that checks from start to finish if it works. Treat system as a black box, and test against the specifications. A series of test and a blend of test types, such as black and white box testing
What is code coverage?
Covering everything.
Statements: which statements were executed?
branch: which branches of the control flow graph were executed?
condition: which conditions in boolean expressions were evaluated?
What are software inspections?
Inspections involve people examining the system to try find anomalies and defects. May be applied to any representation of the system (don’t require execution of the system, can be in the model phase). Happens at all stage of the process.
What is included in a manual test case?
Title, pre-conditions, test steps, expected results
What is development testing?
Testing activities done while developing the system. Involves: unit testing, integration testing. system testing.
What is automated testing?
When possible, you want to run unit tests automatically, so that they can be run and checked without manual intervention. There are testing automation frameworks.
What is regression testing?
Testing that changes haven’t broken the previously working code.
What is release testing?
Testing a particular release of a system that is intended for use outside the development team. Usually a blackbox testing process. A form of system testing that is completed by a seperate team.
Some guidelines for this include:
- choosing inputs that force the system to generate error messages
- design inputs that cause buffer overflow
- repeat same input several times
- force invalid outputs to be generated
Requirements based testing
Examining each requirement and developing tests for it.
Function reqs: testing wether a certain feature as defined in req/user story has been implemented.
Non-functional reqs: testing properties defined in non-functional requirements.
What is performance testing?
A part of release testing may involve testing performance of the system. This may involve steadily increasing the load until performance becomes unacceptable. Stress testing is deliberately overloading the system to test its failure behaviour.
What are the types of user testing?
Alpha testing: very rough version of system, users work with the development team at the developers site.
Beta testing: a release of the software is made available to a small group of users to experiment and raise problems
Acceptance testing: customers test a system to see whether or not its ready to be accepted (mainly for custom systems) In agile, there is no such thing as acceptance testing, it is integrated in.
What is test driven development?
Interleaving testing and code development. Tests are written before code and passing the tests is the main driver of development.
Benefits:
- Code coverage (every bit of code has a test)
- regression testing suite developed incrementally during development.
- simplified debugging
- system documentation formed by the tests