Week 8 Software Testing Flashcards
Why is software testing important?
Software is deeply integrated into our society, and is often an element of critical or costly systems. If the software running these systems is flawed, failure may resulting in massive causalities, economic loss and destruction of the environment.
What happened with Mars climate orbiter?
Imperial to metric conversion was not properly implemented, caused crash.
What happened with Therac-25?
Race condition caused radiation overdose and death.
What happened with Ariane 5
Floating point to integer overflow caused by reused code from previous generation. 370 million cost.
What are the most common quality assurance methods.
Review and inspection of software.
What is testing vs debugging?
Testing detects/reveals errors, whilst debugging is for diagnosing/correcting the root cause of identified errors.
Can testing completely fix errors?
No, testing can never completely prove the absence of errors, testing alone doesn’t improve software quality.
How should you approach testing?
You must assume there are errors or flaws within the software system.
What are the 3 Test adequacy Criteria?
Test generation, Test selection and Test prioritisation
What is poor test generation?
Amount of tests is inadequate.
What is test selection?
Excessive testing and redundant tests create QA overhead. We need to be selective with what we test.
What is Test prioritisation?
We cannot possibly always run all important tests, sometimes release cycle means that we must select only the most critical tests.
What are the 5 main types of testing in order?
- Unit testing.
- Component testing
- Integration testing
- System testing
- Regression testing.
What does unit testing execute?
Complete classes, routines or small programs. With testing stubs or drivers.
What is Unit testing?
Is primarily performed by developers, it is a form of white box testing. You want to ensure that execution of the program matches the specification provided.
What is component testing?
Component testing is not concerned with the execution of the program. It is primarily performed by testers as a black box test. Component testing tests if the software fulfils the feature level requirements.
What does unit testing execute?
Complete classes, routines or small programs. With testing stubs or drivers.
What does component testing execute?
Execution of classes, package, small programs or other elements where testing stubs or drivers are replaced with real objects.
What is Integration testing?
When components of a system are integrated with eachother, how they interact and work together is tested.
(How do they interact and how does data flow)
What is system testing?
Once all the components (including external software/hardware) have been integrated into the software’s final configuration, the execution and operation of the unified system is tested.
What is regression testing?
Repetition of previously performed tests in order to uncover defects.
What are the four stages of system testing?
Functional testing (functional requirements), quality testing (non-functional requirements), acceptance testing(Customer verifies all requirements) and installation testing (testing in user environment).
What is black box testing? How is it done?
Tests where the tests cannot see internals of the executed item.
Uses:
- Equivalence class partitioning (ECP)
- Boundary value analysis (BVA)
What is white box testing? What does it use?
Tests where the tester is aware of the inner workings of the tested item.
- Utilises code coverage
What is code coverage?
Code coverage basically tells you how much of your code is covered under tests. For example, if you have 90% code coverage, it means 10% of the code is not covered under tests. It is a measurement of how many lines/branches of your program execute during testing.
What is Equivalence Class Partitioning? (ECP)
You divide the input of a component into multiple classes and select only one input from each class. Assumes homogeneity (Meaning inputs from the same EC cause similar behaviours)
What is Boundary Value Analysis (BVA)
Select corner courses and see if the component will continue to hold up. Enter invalid values and try to break the component.
What are the benefits of ECP?
Test reduction without losing test coverage.
What is test coverage based on?
What is it closely related too?
Based on:
- The functional specification (blackbox)
- Internal program structure (white-box)
- Closely related to test acceleration
What is three factors of testing coverage from a whitebox perspective
- Statement coverage
- Branch coverage
- Path coverage