Fundamentals of Testing Flashcards
(121 cards)
Why is testing necessary?
Helps in achieving agreed upon goals
NOT limited to the Test Team
Testing Contributes to success
- Cost-effective way to find defects
- Evaluation of quality leads to well-informed decisions
- Testers represent the users in the development project
- Sometimes required (contractually, legally, industry-specific)
How testing reduces risk?
Reduce the risk of failures in operation by:
- Being involved in design reviews & refinements - prevent defects - prevent design defects and early test identification
- working with developers - increase understanding on code - reduce code and test defects
- verifying and validation before go-live - detect and fix failures
- better meet the stakeholder requirements
Is it possible to test everything in software?
No, testing everything is impractical and impossible due to time and resource constraints.
True or False: Testing is enough when you’ve done what you planned.
False. Plans may not account for unforeseen changes or adjustments.
True or False: Testing is enough when your customer or user is happy.
False. Testing done internally may not be visible to the customer, and their satisfaction is only apparent after product release.
Why can’t we say a system is “proven” to work correctly?
Because there is never absolute proof that a system works without bugs.
Example: You can prove that no bugs were found in executed test cases, but not that the system is bug-free.
When is testing enough according to confidence?
Testing is enough when the team is confident the system works as intended.
Note: Confidence is key to deciding whether the product is ready for release.
How does risk affect the amount of testing needed?
Higher risks, like potential loss of life or significant failure impact, require more testing. Lower-risk systems, like simple web applications, need less testing.
What are some risks that influence the amount of testing?
Risks in software testing refer to potential problems that could arise if the software does not work as expected. These risks guide how much effort and resources should be allocated to testing.
Here are the key risks, explained with examples:
- Missing Important Faults
Explanation: There is a risk of not detecting critical defects before release.
Example: In a banking app, if a bug allows unauthorized access to accounts, the consequences could be catastrophic. This risk requires rigorous testing of security features. - Incurring Failure Costs
Explanation: Bugs discovered after release can lead to significant costs for fixing them and handling the impact.
Example: A payment gateway error that double-charges customers might lead to refunds, legal issues, and customer dissatisfaction. - Releasing Untested or Under-Tested Software
Explanation: The risk of not testing enough might result in the product failing in production.
Example: A mobile app crashes on certain devices because compatibility was not thoroughly tested. - Losing Credibility and Market Share
Explanation: If users encounter bugs frequently, they might lose trust in the software and switch to competitors.
Example: A video streaming platform with constant buffering issues will lose users to competitors like Netflix or YouTube. - Missing a Market Window
Explanation: Delaying a release due to excessive testing can result in losing the opportunity to enter the market at the right time.
Example: If an e-commerce app isn’t ready for a Black Friday launch, the business misses out on a critical sales period. - Over-Testing or Ineffective Testing
Explanation: Spending too much time and resources on testing parts of the system that are low risk can lead to wasted effort.
Example: Exhaustively testing the UI color scheme of an app while neglecting backend performance testing.
Practical Summary
The amount of testing required is determined by assessing risks like:
What happens if a bug is missed?
How much will it cost to fix issues later?
How much will users or the business be impacted?
By understanding these risks, you can focus testing on the most critical areas, ensuring quality without wasting time or resources.
What is risk-based testing?
A testing approach that prioritizes testing based on risk.
How does risk-based testing prioritize tests?
Determine what to test first.
Focus on the most critical areas.
Decide how thoroughly to test each item.
Allocate time effectively.
What is the main principle of prioritizing tests in risk-based testing?
At any point, testing should focus on the most important areas so that the best testing is done within the available time.
Example: Testing login functionality of a banking app is higher priority than testing a font size change in the UI.
Q: What is Quality Management, and where do QA and QC fit into it?
Quality Management is the broader umbrella covering all activities to direct and control an organization regarding quality.
Quality Assurance (QA) sits under Quality Management and focuses on improving processes to ensure the final product meets quality standards.
Quality Control (QC) also sits under Quality Management and focuses on checking the actual product to find and correct defects (testing is a core QC activity).
Important Note:
Quality Management → includes QA and QC.
QA → process improvements (preventive).
QC → product checks (corrective).
What is the relationship between errors, defects, and failures in software?
An error (human mistake) may lead to a defect (a fault/bug in the code), which can then cause a failure (when the software deviates from expected behavior).
Important Note:
Error → Defect → Failure
A defect does not always lead to a failure. Sometimes the code path with the defect is never executed or the defect conditions never occur.
According to ISTQB terminology, which term best describes a human action producing an incorrect result in software?
Error
Explanation:
An error is a mistake made by a human (developer, designer, tester, etc.) that can lead to defects in software artifacts.
Example: A developer forgetting to handle invalid input in a date field.
In ISTQB terms, what is a “failure”?
A failure is an observable deviation of the software from its expected outcome or service.
Example: When entering letters into a date field causes a crash instead of a friendly “invalid input” message.
True or False: A system can be considered reliable even if it contains faults.
True
Explanation:
Software can have defects but still be perceived as reliable if those defects are not triggered or do not significantly impact the user.
Comparison: Think of a large, popular application that rarely crashes for most users. It still has hidden defects, but those defects don’t affect the majority of workflows.
Which statement best describes a “root cause”?
1. It is the line of code where the failure is observed.
2. It is the earliest action or condition that created a defect.
3. It is the final user complaint about a software bug.
- The root cause is the earliest action or condition that led to the defect.
Important Note:
Root cause analysis aims to prevent similar defects by addressing the underlying issue (e.g., a knowledge gap, miscommunication, or unclear requirements).
When is root cause analysis typically performed, and why is it useful?
It is performed after a failure is observed in an environment (e.g., test, production). It’s useful because identifying the root cause helps improve processes and prevent similar defects in the future.
Example: Using the “5 Whys” technique to trace an incorrect bonus calculation back to unclear requirements provided by a product owner.
Where do defects occur?
Documentation
- Requirement specifications
- Test scripts
Source code
Any supporting artifacts
Basically, defects can be found in any stage of the SDLC in any work product, but the earlier they are found, the cheaper they are to fix.
Can you explain the relationship between error, defect, and failure with an example?
A:
Error: A developer forgets to validate user input for a date field.
Defect: The code does not handle invalid inputs, allowing letters in the date field.
Failure: The software crashes when a user enters letters into the date field.
Why do defects occur in software development?
Defects occur due to a variety of reasons, including:
Human Errors: Mistakes made by developers, testers, or other stakeholders.
Time Pressure: Deadlines reduce focus and attention to detail.
Complex Systems: Complex processes or technologies increase the likelihood of mistakes.
Miscommunication: Gaps in understanding between stakeholders lead to unclear or incorrect requirements.
Inexperienced Staff: Lack of skills or experience increases errors.
Environmental Conditions: Factors like hardware issues, radiation, or pollution can impact software or firmware.
Blind Spots: People may not notice their own mistakes when reviewing their work.
Why is it important to find defects early?
Cost of Fixing Defects: Defects are cheaper to fix when found early in the software development lifecycle (SDLC).
Example: Correcting a typo in requirements costs far less than fixing a defect in production.
Key Point:
The earlier a defect is identified, the less impact it has on time, resources, and costs.
What is reliability in software, and how is it related to defects?
Reliability is the probability that software will not cause a failure under specified conditions for a specified time.
Example: A payroll system reliably processes payments without errors for six months.
Relation to Defects:
A reliable system can have defects, as long as those defects do not lead to failures under typical usage.