Unit-4
Basics of software Testing
Defination: Software Testing 02 marks
• Software testing is the process of evaluating a software product or
application to ensure it functions as expected, meets requirements, and
is free from defects or errors before it's released.
• The primary goal is to improve the software's quality, reliability, and user
satisfaction by finding and fixing problems early in the development
lifecycle.
Need/ Importance of Software Testing.. 04 marks
• Software testing is essential to ensure that applications work correctly,
perform well, and are free from critical bugs before reaching users. It helps
identify issues early, improves software quality, and enhances user
experience.
• Need/ Importance of Software Testing
[Link] Product Quality.
[Link] Defects/Bugs as early as possible.
[Link] better user Experience.
[Link] Effectiveness .(Save cost)
5. Increasing Trust and Customer Satisfaction
[Link] Security Vulnerabilities.
[Link] Quality & Reliability of Software.
Objectives of Software Testing. 04 Marks
• [Link] Errors
• [Link] good test cases.
• [Link] Improvement.
• [Link] Customer Requirement.
• [Link] & Quality of Software.
• [Link] Maintenance Cost
Software Testing Life Cycle: 04 marks
• The Software Testing Life Cycle (STLC) is a systematic and structured
approach to software testing, ensuring the quality and reliability of a
software product. It is a crucial part of the broader Software Development
Life Cycle (SDLC) and typically consists of the following phases:
[Link] Analysis:
• Understanding the functional and non-functional requirements of the
software.
• Identifying testable requirements and clarifying any ambiguities.
• Defining the scope of testing.
[Link] Planning:
• Developing a comprehensive test plan document.
• Defining testing objectives, strategies, and resources.
• Estimating effort and timelines for testing activities.
• Identifying test environments and tools.
[Link] Case Development/Design:
• Creating detailed test cases based on the analyzed requirements.
• Designing test scenarios and test data.
• Prioritizing test cases based on criticality and risk.
4. Test Environment Setup:
• Configuring the necessary hardware and software for testing.
• Setting up test data and ensuring the environment mirrors the production environment as
closely as possible.
5. Test Execution:
• Executing the designed test cases in the prepared test environment.
• Recording test results and logging any defects found.
• Tracking the status of test cases (pass, fail, blocked, etc.).
6. Test Cycle Closure:
• Evaluating test results and preparing test summary reports.
• Analyzing defect trends and root causes.
• Obtaining sign-off for the testing cycle.
• Advantages of STLC:
[Link] softwware quality.
[Link] defect detection.
[Link] Customer satisfaction.
[Link] maintainence cost.
5. Cost effective development.
Disadvantages:
1. Time consuming
[Link] not gurantee of zero defects
3. Difficult to cover all scenarios.
Testing Terminology: Failure,Fault ,Error,
Defect, Bug (Defination of each 01 Mark)
Software Testing Life Cycle
When to start and stop testing of software.
(Entry & Exit Criteria of Software Testing) 04 marks
• In software testing, entry criteria are the conditions that must be met to start a test phase,
ensuring readiness for testing, such as approved requirements and a ready test environment. Exit
criteria are the conditions that must be met to conclude a test phase, such as completion of test
execution, all high-priority defects resolved, and specific coverage goals achieved.
• Entry Criteria : These are the prerequisites for beginning a testing phase.
• Approved Requirements: The project's requirements must be clearly defined and officially
approved.
• Test Plan and Design Ready: The test plan, test design, and test cases must be prepared and
documented.
• Test Environment Available: The necessary hardware, software, tools, and configuration for test
execution must be in place.
• Availability of Test Data: Adequate and proper test data is available for execution.
• Trained Testers and Resources: Testing personnel are trained, and the required resources are
ready.
• Integrated System Components: For system testing, the integrated components of the system
should be ready for testing.
Exit Criteria: These are the conditions that signal the completion of a
testing phase or project.
• Test Case Execution Completed: All planned test cases have been
executed.
• Defect Status: All high-priority defects have been fixed or deferred.
• Coverage Achieved: A specified level of functional and code coverage has
been reached.
• Passing Quality Standards: The system meets predefined quality and
functionality standards.
• Test Reports Finalized: The test summary reports and defect reports are
complete and signed off.
What is Test Case:
• In software testing, a test case is a detailed, documented set of
instructions used to verify a specific feature or function of an
application.
• It serves as a blueprint for testers, outlining the steps to execute, the
inputs to provide, and the expected outcome.
• The primary goal of a test case is to determine if the software meets
its requirements and functions as intended.
• Key Components of a Test Case:
• Test Case ID: A unique identifier for the test case.
• Test Case Title/Name: A concise description of what is being tested.
• Pre-conditions: Any conditions that must be met before executing the test case
(e.g., user logged in, specific data available).
• Test Steps: A detailed, step-by-step sequence of actions a tester needs to
perform.
• Test Data: The specific inputs or data used during the execution of the test steps.
• Expected Result: The anticipated outcome or behavior of the system after
executing the test steps.
• Actual Result: The observed outcome when the test case is executed.
• Post-conditions: Any conditions that should exist after the test case is executed
(e.g., data state, system state).
• Status: Whether the test case passed or failed.
Write & Design the Test cases for Username and
Password field of Login Form. Marks-04
Difference between QA & QC 04 Marks
Difference betweenVerification & Validation 04 marks
Static Testing & Dynamic Testing
The Box Approaches of Software Testing (Different
Software Testing Methods)
• The "Box Approaches" in software testing refer to different perspectives
from which software is tested, primarily categorized into Black Box, White
Box, and Grey Box testing.
• These approaches determine the level of knowledge the tester has about
the internal workings of the software under test.
1. Black Box Testing:In Black Box testing, the tester has no knowledge of the internal
structure, code, or implementation details of the software. The focus is solely on the
external behavior and functionality of the application based on user requirements and
specifications.
• Examples: Functional testing (unit, integration, system, acceptance), performance testing,
usability testing.
[Link] Box Testing:White Box testing, also known as Clear Box, Glass Box, or Structural
testing, involves a detailed examination of the internal structure, code, and logic of the
application. The tester has access to the source code and uses this knowledge to design test
cases that cover various code paths, branches, and conditions.
Examples: Unit testing, code reviews, static and dynamic analysis, mutation testing.
[Link] Box Testing:Grey Box testing is a hybrid approach that combines elements of both
Black Box and White Box testing.
Example: Testing data flow between UI and database (with schema knowledge but no
application source code), integration testing where some component APIs are known.
Black Box Testing
• Black box testing, a method of software testing that examines the
functionality of an application without peering into its internal structures or
coding.
White Box Testing
• White box testing, also known as clear box, glass box, or structural testing,
involves examining the internal structure and logic of the code. This
includes testing internal paths, conditional statements, loops, and data
structures.
Difference between Black box & White Box Testing
Levels of Testing
1. Unit Testing:
• What it is:
• The smallest, individual components or modules of a software application
are tested to ensure they function correctly in isolation.
• Who does it:
• Typically performed by the developers who wrote the code.
• Purpose:
• To verify that each unit works as expected before combining it with other
components.
Working Principle of Unit Testing
• Stubs and drivers are dummy code components used in unit testing to
isolate and test individual modules when dependent modules are not yet
available or fully implemented.
2. Integration Testing
• What it is:
• After unit testing, this level tests how multiple, combined modules
interact with each other to ensure the data flows correctly between
them.
• Who does it:
• Generally performed by testers.
• Purpose:
• To uncover defects in the interfaces and interactions between
integrated units.
• Integration Testing types -
• Incremental Integration Testing:
• Description: Modules are integrated and tested in smaller, incremental steps.
This approach facilitates easier defect localization. It includes:
• Top-Down Integration Testing:
• Description: Starts with higher-level modules and progressively integrates
lower-level modules. Stubs are used to simulate the behavior of lower-level
modules that are not yet developed.
• Example: In an e-commerce application, testing the "Order Processing"
module first, using a stub for the "Payment Gateway" module until it's ready.
2. Bottom-Up Integration Testing:
• Description: Starts with lower-level modules and progressively integrates
them with higher-level modules. Drivers are used to simulate the behavior of
higher-level modules that are not yet developed.
• Example: In a social media application, testing the "User Profile" module first,
using a driver to simulate interactions from the "News Feed" module until it's
integrated.
3. Sandwich (Hybrid) Integration Testing:
• Description: Combines both top-down and bottom-up approaches, often
used in large projects with multiple layers.
• Example: In a multi-layered enterprise application, integrating the core
business logic using a top-down approach while simultaneously integrating
the database and utility layers using a bottom-up approach, and then
merging them.
[Link] Testing
• What it is:
• The complete, integrated software system is tested as a whole to
ensure it meets all specified requirements and functions as a
complete product.
• Who does it:
• Conducted by the testing team.
• Purpose:
• To evaluate the system's compliance with functional and non-
functional requirements from end-to-end
[Link] Testing
• What it is:
• The final level, where the client or end-users test the software to
confirm it meets their business needs and requirements.
• Who does it:
• Performed by the client or authorized users.
• Purpose:
• To ensure the software is acceptable for deployment and meets the
user's criteria before it is delivered.
Acceptance Testing can be done
using- Alpha & Beta Testing 04 marks