0% found this document useful (0 votes)
35 views6 pages

Unit1 Unit2 Unit3 Answers

The document provides an overview of software testing and quality assurance, detailing the differences between testing, verification, and validation, as well as the importance of verification in the software development lifecycle. It covers various testing strategies, types of testing such as unit, integration, system, and security testing, and discusses challenges in testing object-oriented software. Additionally, it outlines debugging processes and metrics for evaluating software quality and testing effectiveness.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views6 pages

Unit1 Unit2 Unit3 Answers

The document provides an overview of software testing and quality assurance, detailing the differences between testing, verification, and validation, as well as the importance of verification in the software development lifecycle. It covers various testing strategies, types of testing such as unit, integration, system, and security testing, and discusses challenges in testing object-oriented software. Additionally, it outlines debugging processes and metrics for evaluating software quality and testing effectiveness.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

SOFTWARE TESTING & QUALITY ASSURANCE (203105395)

Detailed Answers for Unit 1

UNIT 1: INTRODUCTION TO TESTING

1. What is the difference between Testing, Verification, and Validation?

• Testing is the process of executing a program with the intent of finding faults or verifying that it
behaves as expected. It is done dynamically by running the software.
• Verification refers to the process of evaluating work-products of a development phase to ensure
they meet the specified requirements. It involves reviews and walkthroughs. It answers: "Are we
building the product right?"
• Validation checks whether the final product meets the business needs and expectations of the user.
It is done after verification through actual testing. It answers: "Are we building the right product?"

2. Why is Verification important in the software development lifecycle?

Verification is crucial because:

• It helps in identifying defects early during the design or requirement phases.


• Reduces cost, since fixing defects early is cheaper than after deployment.
• Ensures correctness, completeness, and consistency of the software product.
• Helps meet standards and maintain project timelines.

3. At what stages are Verification and Validation performed?

• Verification is done during the software development lifecycle at the requirements gathering,
design, and coding phases.
• Validation is done after the build phase, during testing phases like system testing or acceptance
testing.

4. What are test strategies in software testing?

Test strategies are high-level descriptions of the test levels to be performed and the testing within those
levels. It includes:

• Scope and objectives of testing


• Testing types and methods (manual or automated)
• Test environment and configuration management
• Entry and exit criteria for each test level
• Resource planning, roles and responsibilities

5. How do test strategies differ for conventional software and object-oriented software?

• In conventional software, testing is function-centric and focuses on verifying algorithmic behavior.

1
• In object-oriented software, testing strategy includes:
• Testing of class hierarchies and inheritance
• Testing object interactions and state behavior
• Special attention to polymorphism and encapsulation
• Testing of reusable and generic components

6. What are some challenges in testing object-oriented software?

• Encapsulation hides implementation, making internal states hard to test.


• Inheritance can cause faults to propagate from base to derived classes.
• Polymorphism allows dynamic method binding, which complicates test case design.
• Concurrency in object communication may lead to race conditions.
• State-based behavior adds complexity as the object can behave differently in different states.

7. What is Unit Testing and why is it important?

Unit testing involves testing individual components or functions of a software system. Importance:

• Verifies correctness of modules in isolation


• Simplifies integration by ensuring stable modules
• Facilitates changes and refactoring
• Enables automation through tools like JUnit, NUnit

8. Who performs Unit Testing and what tools are used?

• Typically performed by developers.


• Common tools include:
• JUnit – for Java
• NUnit – for .NET
• PyTest – for Python
• Google Test – for C++
• IDE plugins and CI tools like Jenkins

9. What is Integration Testing?

Integration testing focuses on testing the interaction between components or systems. It ensures:

• Proper data flow between modules


• Communication interfaces work as expected
• Functional behavior of combined modules is correct

10. What are the different types of integration testing approaches (Top-Down, Bottom-Up, Big Bang)?

• Top-Down Integration Testing:


• Starts from the top-level module and progressively integrates lower modules.
• Uses stubs for lower modules.
• Bottom-Up Integration Testing:
• Begins from lower-level modules and integrates upward.

2
• Uses drivers to simulate higher-level modules.
• Big Bang Integration Testing:
• All modules are integrated simultaneously and tested as a complete system.
• Hard to isolate failures and debug.

11. What is Validation Testing?

Validation testing ensures the developed product meets the user's needs and expectations. It is done by
executing actual tests on the system (like system testing and acceptance testing).

12. How is Validation Testing different from Verification?

Feature Verification Validation

What Process-oriented Product-oriented

Focus Internal consistency User satisfaction

Methods Reviews, walkthroughs Testing, user feedback

Timing During development After development

13. What is Alpha Testing?

Alpha testing is an internal form of user acceptance testing performed at the developer’s site. Conducted
by real users in a controlled environment to detect bugs before release.

14. What is Beta Testing?

Beta testing is conducted by end-users at their own locations in real-world conditions. Feedback is
collected to improve product quality before release.

15. What are the key differences between Alpha and Beta Testing?

Feature Alpha Testing Beta Testing

Location Developer site Customer site

Environment Controlled Real-world

Testers Internal staff or customers End users

Feedback use Before beta release Before final release

16. What is System Testing?

System testing is a type of black-box testing that validates the complete and integrated software system. It
ensures:

• Software meets requirements

3
• Functionality works end-to-end
• System behavior is consistent under different scenarios

17. How does System Testing differ from Integration Testing?

Feature System Testing Integration Testing

Scope Entire system Interfaces and modules

Focus Requirement validation Communication between units

Test Types Functional, performance, etc. Interface-specific

18. What is Recovery Testing in software testing?

Recovery testing checks the system’s ability to recover from failures, such as power outages, system
crashes, or network loss. It ensures:

• System saves user data


• Performs auto-recovery
• Provides proper error messages

19. What scenarios are typically tested in Recovery Testing?

• Simulating sudden shutdowns


• Disconnecting network cables
• Interrupting database operations
• Verifying system logs and recovery scripts

20. What is Security Testing?

Security testing verifies that software:

• Is resistant to attacks
• Maintains data confidentiality and integrity
• Prevents unauthorized access
• Ensures secure authentication and session management

21. What are the common types of vulnerabilities tested in Security Testing?

• SQL Injection
• Cross-Site Scripting (XSS)
• Insecure Direct Object References
• Broken Authentication
• Cross-Site Request Forgery (CSRF)

4
22. What is Stress Testing?

Stress testing evaluates system behavior under unusual or extreme load conditions. It ensures:

• System does not crash under stress


• Graceful degradation is observed
• Useful for mission-critical applications

23. How does Stress Testing differ from Load Testing?

Criteria Stress Testing Load Testing

Focus Extreme or breaking point load Expected or average load

Purpose Identify limits and stability Validate performance and capacity

24. What is Performance Testing?

Performance testing measures the responsiveness, stability, and speed of the system under specific
conditions. It helps ensure:

• Fast response time


• Efficient resource usage
• Scalability under load

25. What are key metrics observed during Performance Testing?

• Response Time – Time taken to respond to a request


• Throughput – Number of transactions per second
• CPU Usage – Utilization of processing power
• Memory Usage – RAM consumed during operation
• Latency – Delay before data transfer starts

26. What are software metrics?

Software metrics are quantitative measures that help track and assess software quality, maintainability,
and development progress. Types:

• Product metrics (code size, complexity)


• Process metrics (effort, cost)
• Project metrics (schedule, resource usage)

27. What are common metrics used for source code quality evaluation (e.g., LOC, Cyclomatic
Complexity)?

• Lines of Code (LOC) – Indicates size and maintainability


• Cyclomatic Complexity – Measures independent paths for testing
• Halstead Metrics – Complexity from operators and operands
• Function Points – Measures functionality delivered to users

5
28. What are testing metrics?

Testing metrics provide insights on test effectiveness and process improvement. They help evaluate test
planning, execution, and quality control.

29. What are examples of metrics used to measure testing efficiency and effectiveness?

• Defect Density – Defects per KLOC (thousand lines of code)


• Test Case Execution Rate – % of test cases executed
• Defect Leakage – Defects found after release
• Test Coverage – % of code or functionality tested

30. What is the Debugging Process in software testing?

Debugging is the systematic process of identifying, isolating, and correcting software bugs found during
testing.

31. What are the main steps involved in debugging?

1. Understand the symptom of the issue


2. Reproduce the error consistently
3. Locate the source in the code
4. Identify root cause
5. Apply the fix and verify

32. What are different debugging strategies?

• Brute Force Debugging – Adding print/log statements


• Backtracking – Tracing program backward from failure point
• Cause Elimination – Hypothesis testing through trial and error
• Program Slicing – Isolate the part of code affecting a variable

33. How do systematic debugging techniques improve software reliability?

• Identify and fix bugs efficiently


• Prevent defect reoccurrence
• Improve code maintainability
• Increase end-user satisfaction and trust in the system

Next: Unit 2 Answers Coming Up...

You might also like