Testing Flashcards
What is the famous saying regarding testing for errors
Testing can only show the presence of errors, not their absence
What are the 2 things you are trying to do when testing software
- Making sure all requirements are met
- Squash bugs
What is the famous wording for the difference between validation and verification
Validation: Are we building the right product?
Verification: Are we building the product right?
What is V&V concerned with
Checking that the software is meeting specs/reqs and that the functionality works as expected
What is verification (as opposed to validation)
Checking that the software meets functional and non-functional requirements
What is validation (as opposed to verification)
Checking that the software meets the user’s and stakeholder’s expectations, which are not necessarily part of any requirements
What is the goal of V&V
Establish confidence that the software system is “fit for purpose”
What does it mean when a system is “fit for purpose”
The system must be good enough for its intended use
What are the 3 things that determine how much confidence a system needs to have (when is it “good enough”)
- Software Purpose (Criticalness)
- User Expectations (Previous Experience + Company Maturity)
- Marketing Environment (Other Competition)
What should also be done for V&V besides testing, and what are the 3 advantages of doing it
Inspections/Reviews:
1. Errors are discovered that testing would have otherwise been hiding due to the lack of knowing if it came from a known error or a new one
2. You can discover errors before the system can even be ready to test, reducing development costs
3. You can discover a lack of quality in the code that testing cannot identify, such as compliance, portability, and maintainability
What are the 3 things inspections NOT good for that testing could detect
- Unexpected interactions between different parts of the system
- Timing problems (race conditions)
- System performance
What is important to understand when it comes to making test cases
Test cases are impossible to automatically generate. You must be INVOLVED in understanding what the system is supposed to do in order to create test cases and the expected test results.
What are the 3 major stages of testing for a software’s lifespan
- Development Testing (during development)
- Release Testing (finalizing)
- User Testing (post-prod in non-dev environments)
What is particularly impossible to automatically test
GUIs and unanticpated side effects
What are the 3 stages of Development Testing
- Unit Testing (objects/methods)
- Component Testing (composite interfaces)
- System Testing (whole, component interactions)
What are the 3 parts of an automated test
- Setup (initialize, inputs + outputs)
- Call (the object)
- Assertion (compare result)
What can be used that would skip bottlenecks in automated tests, such as database requests
Mock objects
What is unit test case “Effectiveness”
Making test cases that either show that the component is doing what it is supposed to do and that defects are revealed
What are 2 effective types of strategies for developing test cases
- Partition Testing
- Guideline-based Testing
What is Partition Testing
Identify and define all possible (separate) sets of inputs for a unit test as classes, and group them from their (supposedly correct) behavior (output) as classes (behavior of separate input classes can interleave), with these classes being called “equivalence partitions/domains”, and for all classes of input and output partitions, if the partitions are ranges, test the boundaries of them (along with the middle), or otherwise test the full sets. Also identify all possible INVALID input and output equivalence partitions and test that the system is correctly handling those errors.
What is Guideline-based Testing
Use previous knowledge of common developer errors to include in all tests
When is it appropriate to start performing Component Testing
Once all of the unit testing has been completed
What are the 4 types of interfaces between components
- Parameter Interfaces (direct data flow)
- Shared Memory Interfaces (external)
- Procedural Interfaces (call the methods from other)
- Message-Passing Interfaces (pls)
What are the 3 most common forms of interface errors
- Interface Misuse (type)
- Interface Misunderstanding (ordering, etc)
- Timing Errors (race cond.)