InterviewQuestions (Aliza)
InterviewQuestions (Aliza)
2. How does a use case differ from a test case? Provide examples to illustrate the
difference.
Feature Use Case Test Case
Describes system behavior from a Describes specific conditions to validate
Purpose
user’s perspective functionality
Steps, actors, preconditions, Test inputs, expected output, pass/fail
Content
postconditions criteria
Exampl "User logs in using valid "Enter valid credentials → Click Login →
e credentials" Verify access granted"
Example:
• Use Case: "A customer withdraws cash from an ATM."
• Test Case: "Insert a valid card → Enter correct PIN → Request withdrawal of $100
→ Verify the ATM dispenses $100 and updates the balance correctly."
3. Describe the process of deriving test cases from a use case. What key steps are
involved?
1. Identify the Use Case – Understand the user goal and steps involved.
2. Define Preconditions – List the necessary conditions before execution.
3. Extract Scenarios – Consider normal flow, alternative flows, and error conditions.
4. Convert Steps into Test Cases – Write detailed test cases covering each scenario.
5. Define Inputs & Expected Outcomes – Specify test data and expected results.
6. Prioritize Test Cases – Focus on critical functionalities first.
4. What are positive and negative test cases? Provide an example for each.
• Positive Test Case: Tests valid input and expected system behavior.
• Example: Enter a correct username and password → Click "Login" → Verify
successful login.
• Negative Test Case: Tests invalid input or unexpected actions to check system
stability.
• Example: Enter an incorrect password three times → Click "Login" → Verify
system locks the account.
5. How do you ensure complete test coverage when creating test cases from a use
case?
• Identify all possible scenarios (normal, alternative, and error flows).
• Use Equivalence Partitioning & Boundary Value Analysis to test different input
ranges.
• Validate all business rules and system constraints.
• Consider usability, security, and performance aspects.
• Perform requirement traceability analysis to ensure all requirements are tested.
6. What is an edge case in testing? How does it differ from a negative test case?
• Edge Case: Tests extreme conditions that rarely occur but can break the system.
• Example: Entering a 256-character-long password in a field that accepts only
255 characters.
• Negative Test Case: Tests invalid input to verify error handling.
• Example: Entering a password with only spaces and verifying an error
message is displayed.
Key Difference:
Edge cases focus on system limits, while negative test cases focus on invalid user actions.
7. In a real-world project, what challenges might you face when converting use
cases into test cases? How would you address them?
Challenges & Solutions:
• Ambiguous Use Cases → Clarify with business analysts and developers.
• Missing Edge Cases → Conduct thorough risk analysis.
• Changing Requirements → Maintain a flexible test case design.
• Limited Test Data → Create a diverse dataset covering all scenarios.
• Unclear Expected Outcomes → Collaborate with stakeholders to define clear
expectations.
8. What is a bug report, and why is it important in the software testing process?
A bug report is a document that records details about a defect found in a software
application. It helps developers understand, reproduce, and fix the issue effectively.
Bug Prioritization:
• High Priority – Critical issues that block core functionality (e.g., users cannot log
in).
• Medium Priority – Issues that affect functionality but have workarounds (e.g., UI
misalignment).
• Low Priority – Minor issues that do not impact functionality (e.g., typos in UI).
Bug Categorization:
• Critical (Showstopper) – System crashes, security breaches.
• Major – Key feature failures (e.g., payment processing fails).
• Minor – UI/UX issues, non-blocking bugs.
• Trivial – Cosmetic issues (e.g., incorrect font size).
Example:
• High Priority, Critical Bug: Application crashes when submitting a form.
• Medium Priority, Major Bug: The "Submit" button works but does not display a
success message.
• Low Priority, Minor Bug: The color of the "Login" button is incorrect.
11. What is black-box testing, and how does it differ from white-box testing?
Black-box testing is a software testing method where the tester evaluates the
functionality of an application without knowing its internal code or structure. The focus
is on input-output behavior.
14. Explain boundary value analysis with an example. Why is it important in black-
box testing?
Boundary Value Analysis (BVA) is a technique that tests values at the edges
(boundaries) of valid input ranges, as defects often occur at limits.
Example:
If an age field accepts values from 18 to 60:
• Test with 17, 18, 60, and 61 instead of random numbers.
Importance:
• Identifies edge-case errors efficiently.
• Ensures system stability at limit conditions.
15. What is decision table testing? How can it help in test case design?
Decision Table Testing is used when multiple conditions affect the outcome. It organizes
test scenarios in a table format for better clarity.
Example: Loan approval system:
16. How do you create test cases for black-box testing when there is no proper
documentation?
• Exploratory Testing: Manually interact with the application to understand
functionality.
• Reverse Engineering: Analyze UI, error messages, and logs to infer behavior.
• Stakeholder Communication: Consult developers or business analysts for
insights.
• Comparative Testing: Compare against similar applications or previous versions.
18. What are some challenges faced while performing black-box testing?
• Incomplete or ambiguous requirements – Leads to unclear test cases.
• High number of test cases – Makes it hard to test everything manually.
• Difficult to trace defects to code – Since testers don't see internal logic.
• Automation challenges – Some tests may not be automatable.
19. When you complete an iteration and write bug reports, the development team
fixes the bugs. After the fixes, you retest the application. What type of testing is
this?
• Retesting: If you test only the specific bug fix.
• Regression Testing: If you test the bug fix and also check whether it introduced
new issues in other parts of the system.
20. What is ad-hoc testing? How does it differ from exploratory testing?
• Ad-Hoc Testing is an informal and unstructured testing approach where testers
randomly explore the application without predefined test cases.
• Exploratory Testing is more systematic, where testers learn about the application
and design test scenarios on the fly.
Example:
• Ad-Hoc Testing: Randomly clicking around a web application to find crashes.
• Exploratory Testing: Interacting with different workflows while thinking critically
about possible edge cases.
22. How does Selenium help in black-box testing? What are its advantages and
limitations?
Selenium automates web browsers for functional and regression testing.
✅ Advantages:
• Supports multiple browsers and programming languages.
• Open-source and widely used.
• Supports parallel execution with Selenium Grid.
❌ Limitations:
• Cannot test desktop/mobile apps (only web).
• Requires scripting knowledge.
23. What is the difference between manual black-box testing and automated black-
box testing?
Aspect Manual Testing Automated Testing
Speed Slower Faster
Accurac
Prone to human error More accurate
y
Cost Low initial cost High initial setup cost
Usability and exploratory Regression and repetitive
Best for
testing tests
25. How would you detect and fix a memory leak in an application?
To detect a memory leak:
1. Use memory profiling tools like Valgrind, Purify, or AddressSanitizer.
2. Monitor RAM usage over time—if memory usage keeps increasing, there is a leak.
3. Check for unfreed memory allocations in the code (e.g., missing free() in C/C++).
To fix it:
• Ensure all dynamically allocated memory is properly freed.
• Use smart pointers in C++ (unique_ptr, shared_ptr).
• Run garbage collection in languages like Java and Python.
27. What are the different phases of SDLC? Explain each phase briefly.
SDLC consists of six major phases:
1. Requirement Gathering & Analysis – Business needs are collected and analyzed.
2. Planning – Project scope, cost estimation, and timelines are defined.
3. Design – System architecture and UI/UX designs are created.
4. Development – Coding and software implementation happen here.
5. Testing – Software is tested to detect and fix bugs.
6. Deployment & Maintenance – The software is released, and updates are made as
needed.
28. Compare different SDLC models (Waterfall, Agile, V-Model). When should each
model be used?
Model Description When to Use?
Sequential model, each phase must be When requirements are fixed and
Waterfall
completed before the next starts. well-defined.
Iterative approach, work is done in small When requirements change
Agile
cycles (sprints). frequently.
Verification and validation happen
V-Model When early testing is critical.
simultaneously.
Continuous integration, development, and When rapid deployment and
DevOps
delivery. automation are required.
29. What are the advantages and disadvantages of the Waterfall model?
✅ Advantages:
• Simple to manage.
• Suitable for well-defined projects.
• Documentation is clear.
❌ Disadvantages:
• Not flexible (no changes allowed after the initial phase).
• Testing is done late, increasing defect-fixing costs.
• Poor adaptability for complex projects.
30. What is the difference between Agile and Scrum in SDLC?
• Agile is a software development methodology that promotes iterative and
incremental progress.
• Scrum is a specific framework within Agile that uses sprints (2-4 weeks) and
Scrum Masters to manage tasks.
31. What is the V-Model in SDLC? How does it differ from the Waterfall model?
• The V-Model (Validation & Verification) integrates testing in each phase of SDLC,
unlike Waterfall, where testing happens only at the end.
• Helps in early bug detection.
33. What is risk analysis in SDLC? How do you handle risks in software
development?
Risk Analysis involves identifying potential risks (cost, security, project delays) and
creating mitigation plans.
📌 Steps to handle risks:
1. Identify risks.
2. Analyze their impact.
3. Prioritize risks.
4. Develop mitigation strategies.
5. Monitor risks throughout SDLC.
35. What are the different phases of STLC? Explain each phase.
1. Requirement Analysis – Understand what needs to be tested.
2. Test Planning – Define strategy, scope, and resources.
3. Test Case Development – Write test cases and prepare test data.
4. Test Environment Setup – Set up hardware, software, and network for testing.
5. Test Execution – Run test cases, report bugs.
6. Test Closure – Summarize results, lessons learned.
37. What happens in the Test Planning phase of STLC? Why is it important?
In Test Planning, a strategy is created for testing.
✅ Importance:
• Defines testing scope, schedule, and team roles.
• Helps in resource allocation.
• Identifies risks early.
38. What is a Test Case? How do you write a good test case?
A test case is a set of conditions and steps used to test a feature.
✅ Good test case example:
📌 Scenario: Test login functionality
• Steps: Enter username & password → Click Login
• Expected Result: Successful login
39. What is Test Execution in STLC? What are the possible outcomes of this phase?
Test Execution is the phase where testers run test cases.
✅ Possible outcomes:
• Pass: Functionality works.
• Fail: Defect detected.
• Blocked: Cannot proceed due to dependency.
40. What is Defect Life Cycle (Bug Life Cycle) in STLC? Explain different stages.
Bug Life Cycle:
1. New → Reported bug.
2. Assigned → Sent to developer.
3. In Progress → Developer fixes it.
4. Fixed → Bug resolved.
5. Retest → Tester verifies the fix.
6. Closed → Bug is resolved permanently.
42. How do you measure the effectiveness of testing? What are common test
metrics?
Test Metrics:
• Test Coverage (%) – Measures how much code is tested.
• Defect Density – Bugs per module.
• Test Execution Rate – % of test cases executed.
43. What is Test Closure in STLC? What activities are performed in this phase?
Test Closure is the final phase of STLC where testing results are documented.
✅ Activities:
• Create Test Summary Report.
• Document lessons learned.
• Conduct post-mortem meetings
47. How do you select test cases for White Box Testing?
✅ Test cases are selected based on:
• Code Complexity: Prioritize critical and high-risk modules.
• Control Flow & Data Flow Analysis: Ensure paths with loops and conditions are
tested.
• Security & Edge Cases: Test for vulnerabilities and rare conditions.
• Performance Optimization: Identify inefficient code sections.
48. What is White Box Testing? How does it differ from Gray Box Testing?
• White Box Testing: The tester has complete knowledge of the internal code and
logic.
• Gray Box Testing: The tester has partial knowledge of the internal code while
testing functional behavior.
52. What is Static Code Analysis? How does it help in White Box Testing?
• Static Code Analysis examines source code without executing it to detect errors,
vulnerabilities, and coding standard violations.
• Helps in:
• Detecting syntax errors, unused variables, and memory leaks.
• Ensuring compliance with coding standards (e.g., MISRA, OWASP).
Question:
You are given a pen and asked to write a Use Case for it.
• Write a Use Case for a ballpoint pen.
• Based on your Use Case, create at least two test cases (one positive and one
negative).
✅ Answer:
✅ Answer:
✅ Answer:
✅ Answer:
✅ Answer:
Test Positive/
Description Expected Result
Case ID Negative
Attempt to change password without System should prevent
TC004 ❌ Negative
entering the current password password change
Enter a new password with SQL System should reject
TC005 ❌ Negative
injection (e.g., 123' OR '1'='1) the input