Finals Flashcards
(95 cards)
What are the types of software testing?
1 - Verification testing:
- Intended to show that system conforms to its specifications
- Tests whether the system verifies its functional and non-functional requirements
2- Validation testing:
- Testing whether the software does what the user requires
- Testing whether the software runs without incorrect behavior
What does the level of confidence in a system depend on?
- Software purpose:
Depends on how critical the software is to an organization - User expectations:
User may have low expectations or tolerate certain failures - Marketing environment:
Getting a product to market early may be more important than finding defects
What is software inspection?
- It is prior to testing
- It analyses the system documentation to find problems
- Also known as static verification
What are the advantages of software inspection?
- Useful in searching for program defects
- Inspections do not require executing the system
- Won’t be concerned with interactions between errors
What are difficulties in software inspection
- Manual effort
- Difficult to detect errors which appear due to component interactions
- Difficult to detect problems related to performance issues
- Required dedicated team
What are the 3 stages of testing?
1- Development testing (during development):
- Discover bugs
- Verifying functional requirements
2- Release testing (beta):
- separate testing team tests a complete version of the system before it is released to users
- Verifying functional and non-functional requirements
3- User testing (prod):
Users test the system on their own
What are the 3 different levels development testing?
- Unit testing:
Individual units or object classes are tested - Component testing:
Testing composite components made of individual units - System testing:
Testing the system as a whole
Explain unit testing
- Unit testing is the process of testing the individual program units in isolation
- Units designate individual program entities such as functions, object classes,…
- Focuses on testing the functionality of objects or methods
- It is a defect testing process
- Breaks down and assesses functional requirements at the unit level
What do test automation tools provide?
Generic test classes that can be extended to create specific test cases
What phases does test automation pass through?
1- Setup phase:
Where the system is initialized with test case
2- Call phase:
Object or method to be tested is called
3- Assertion phase:
The result of the call is compared with the expected result
What is a test case and what are the two types of test cases?
- Test procedure designed to show that the unit tested is working properly
1- Evaluating normal operation behavior of a program
2- Evaluating abnormal behavior of a program
What are unit testing strategies that can be considered?
- Partition testing:
Identify group of inputs that are similar and should be processed the same way - Guideline-based testing:
Certain testing guidelines are used. These reflect previous errors that programmers make
Explain partition testing
- Input data and output results are divided into different classes where all members of a class are related
- Each of these classes is an equivalence partition
- Test cases should be chosen from each partition
Testing values in partitions + testing values around boundaries + testing values outside of boundaries
Explain the guideline-based testing
- Choose inputs that force the system to generate all error messages
- Design inputs that cause input buffers to overflow
- Repeat the same input or series of inputs numerous times
- Force invalid outputs to be generated
- Force computations results to be too large or too small
Explain what is a component and what is component testing
- Software components are composite entities made of several interacting entities
- Testing composite components should focus on showing that the component interface meets required specification
- Assumes that unit tests on individual entities have been done
What is interface testing?
- Detects faults due to interface errors
What are the types of interface?
- Parameter interface:
Data passed from one method to another - Shared memory interface:
Block of memory shared between functions - Procedural interface:
Subsystem encapsulates a set of procedures to be called by other subsystems - Message passing interfaces:
Subsystems request services from other subsystems
What are types of interface errors?
- Interface misuse:
Two components calling each other causing an error - Interface misunderstanding:
Calling component assumes behavior of called component which is incorrect - Timing error:
Called and calling components operate at different speeds
What are interface testing guidelines?
- Use edge cases
- Always test pointer parameters with null pointers
- Design tests which cause component to fail
- In message system, use stress testing
- In shared memory systems, vary the order in which components are activated
Explain system testing
- Test interactions between components
- Checks that components are compatible, interact correctly, and transfer the right data
- Test the overall behavior of the system
- Components developed by team members or sub-teams may be integrated at this stage
What are the key considerations in developing testing policies for system testing when exhaustive testing is not possible?
- Since it’s not possible to test every aspect of a system, we develop testing policies that define which parts are most important to test.
Examples:
- All system functions that are accessed through menus
- Combinations of functions that are accessed through the same menu
- User input functions must be tested with correct and incorrect input
What is test-driven development
- It is an approach where we combine testing and code development
- Test cases are written before code and once the test is passed, the code is written
- Code is developed incrementally along with a test for each increment
What are pros of TDD
- Code coverage:
Every code has at least one test associated with it - Regression testing:
Developed incrementally as program is developed - Simplified debugging:
Problem is clear when test fails - System documentation:
Tests are a form of documentation
What are the cons of TDD?
- Programmer prefer programming to testing
- Some test can be difficult to write incrementally
- Difficult to judge completeness of a set of tests
- Requires extra work