Software Testing
Software Testing
Software Testing
It is done to ensure that the software functions as expected and meets user needs.
Static Testing is a type of software testing where the code is checked without
actually running it.
This includes reviewing the code, design documents, and other related documents to
find errors early on.
2. Dynamic Testing:
Dynamic Testing involves testing the software by actually executing the code.
This type of testing checks the functionality of the software by running it and
verifying that it behaves as expected.
Examples include unit tests, integration tests, system tests, and acceptance tests.
3. To make sure that the final product meets user and business requirements.
6. Creating good test cases. A good test case is one that has a high chance of finding
errors that have not been discovered yet.
7. It ensures that the application meets the Business Requirement Specifications (BRS) and
the System Requirement Specifications (SRS) completely.
Define Bug, Error, Fault and Failure. (2M, W-19, W-22, W-23, S-22) ✅
1. Bug: The presence of error at the time of execution of the software.
4. Failure: A failure occurs when the external behavior of a system does not match the
system specification.
Software Testing 1
Verification Validation
Methods used in verification are reviews, Methods used in validation are Black Box
walkthroughs, inspections, and desk Testing, White Box Testing, and non-
checking. functional testing.
The quality assurance team performs Validation is done by the testing team on
verification. the software code.
The cost of fixing errors found in The cost of fixing errors found in
verification is lower than fixing errors validation is higher than fixing errors
found in validation. found in verification.
Enlist any four skills for Software Tester. (2M, S-22, S-24) ✅
1. Communication Skills
2. Analytics Skills
4. Planning
6. Negotiation Skills
7. Attention to details
Boundary Value Analysis (BVA) is a testing technique where test cases are designed using
values at the boundaries of input limits.
Positive testing uses input values within the boundary limits, while negative testing
uses values outside the boundaries.
BVA focuses on finding errors at the boundaries of the input domain rather than in the
center.
Each boundary has both valid and invalid values, and test cases are created for both
scenarios.
BVA is primarily a black box testing technique, but can also be applied in white box
testing, especially for data structures like arrays, stacks, and linked lists.
This technique helps identify test cases that are more likely to detect defects
effectively.
Examples:
1. Example 1: A system accepts numbers from 1 to 10. All other values are invalid.
This approach checks values just inside, on, and just outside the boundaries to make sure
they are handled correctly.
Software Testing 2
Decision tables organize complex business rules, making them useful for both developers
and testers.
Decision tables can assist in test design even if they are not part of the requirements,
as they show the effects of different input combinations and how the software should
respond.
They help developers improve their work and build better relationships with testers.
Testing all possible input combinations can be challenging because there may be too many
combinations.
It is not always possible to test every combination, so selecting the right ones to test
is very important.
If you don’t select combinations systematically, you might end up testing the wrong ones,
making the testing less effective.
Example:
Request Login 0 1 1 1
Where:
1 = True
0 = False
State Entry and Exit Criteria for software testing. (4M, W-22, W-23) ✅
Entry Criteria for Software Testing:
Entry criteria are the minimum conditions that must be met before testing can begin.
These criteria are defined and approved during the test planning phase and are part of
the test plan.
All necessary hardware and software must be installed, configured, and working
properly.
All team members involved in testing should be trained to use the testing tools.
The test environment, including hardware, software, and lab setup, should be ready for
use.
Exit criteria are the minimum conditions that must be met to end a specific phase of
testing.
These criteria are documented and approved during the test planning phase.
Software Testing 3
No high-priority bugs should remain open.
Complex programs are harder to maintain in the future, which can lead to problems.
More complex code can create new defects, especially when complex decision loops are
executed.
Complicated code and designs can lead to failures under complex conditions.
It calculates the minimum number of paths needed to cover all possible paths through a
module.
The more decisions a system makes, the more tests are required.
Cyclomatic complexity helps define the minimum number of test cases needed for a module
and is used throughout the Software Development Life Cycle (SDLC).
The development team can use a Control Flow Graph (CFG) to show the flow of the program.
A CFG is a directed graph where nodes represent different sections of the program, and
edges represent the program's flow between them.
Initial testing done to check if the basic Focuses on verifying specific bug fixes or
functionality of the software works. new features after changes.
Broad and shallow testing of the Narrow and deep testing, focusing on
application. specific areas.
Covers all major functionalities of the Focuses on only the areas affected by
application. recent changes.
Example: Checking if the application opens Example: Verifying that a login bug is
and basic functions work. resolved.
Differentiate Quality Assurance and Quality Control. (4M, S-22, S-23, S-24) ✅
Quality Assurance (QA) Quality Control (QC)
Measures processes, finds weaknesses, and Measures products, finds defects, and
suggests improvements. suggests improvements.
SQA (Software Quality Assurance) ensures SQC (Software Quality Control) ensures
quality in software development processes. quality in the final software product.
Software Testing 4
Quality Assurance (QA) Quality Control (QC)
Static testing checks the code without Dynamic testing involves testing the
running it. software by executing the code.
Done early in the development process. Done after the code is developed.
The work product is reviewed using Methods evaluate the product based on
checklists, standards, and knowledge to defined requirements and designs, marking
locate defects. it as ‘pass’ or ‘fail’.
Examples include inspection, reviews, and Examples include unit tests, integration
walkthroughs. tests, system tests, and acceptance tests.
Differentiate between White Box and Black Box Testing. (4M, W-22, S-24) ✅
WBT (White Box Testing) BBT (Black Box Testing)
It is also called Clear box, Glass-box, or It is also called as Closed box, or Dark-
transparent box testing. box testing.
Testing can be performed by developers and Testing can be performed by end users or
professional testers. anyone.
This testing is best suited for a lower This type of testing is ideal for higher
level of testing like Unit Testing or levels of testing like System Testing,
Integration testing. Acceptance testing.
Development and testing phases are directly linked; the next phase starts only after the
previous one is completed.
The left side of the "V" represents Verification phases, while the right side represents
Validation phases.
Software Testing 5
Verification Phases (Left Side of the V) -
1. Requirement Analysis:
This phase involves talking to customers to understand their needs and expectations.
2. System Design:
This phase focuses on designing the system and setting up the necessary hardware and
communication for product development.
3. Architectural Design:
The system design is broken down into smaller modules, each handling different
functions.
This phase clarifies how data is transferred and how modules communicate with each
other and external systems.
4. Module Design:
Detailed designs for these modules are specified, known as Low-Level Design (LLD).
1. Unit Testing:
Unit Test Plans are created during the module design phase.
These plans are executed to find and fix bugs in individual code units.
2. Integration Testing:
3. System Testing:
This testing confirms that the delivered system meets user requirements and is ready
for use.
2. Integration Testing
3. System Testing
Software Testing 6
4. Acceptance Testing
Drivers are dummy modules that are always used to simulate the high-level modules.
Drivers are only used when main programs are under construction.
Stubs:
Stubs are dummy modules that are always used to simulate the low-level modules.
GUI Testing is the process of checking these visual elements like screens, buttons,
menus, toolbars, and dialog boxes to ensure they function properly.
GUI Testing focuses on what the user sees, ensuring the layout and design work correctly.
2. Checking the connection between the login page and the mailbox.
3. Checking the connection between the mailbox and the delete mails function.
4. Checking the connection between the home page and the profile page, i.e., the profile
page should open up.
Gather details about the hardware, software, and network setup used for testing.
Software Testing 7
2. Determine Performance Criteria:
Define the acceptable performance standards, including response time, resource usage,
and throughput (the amount of data that can be processed).
Analyze the different types of end users who will interact with the system.
Plan the performance tests and determine what data will be collected during the
testing process.
Arrange the necessary tools and resources required for the testing process.
Execute all the test cases and closely monitor the testing process.
Analyze the test results and share them with the team.
2. Validates Business Requirements: It checks if the software fulfills the business goals
and requirements, making sure it solves the intended problems.
5. Helps in Decision Making: It provides valuable feedback for making decisions about
whether to proceed with the release or make improvements.
Differentiate between Alpha and Beta testing. (2M: S-24, 4M: W-19, W-23) ✅
Alpha Testing Beta Testing
Performed by developers and internal QA team. Performed by end users or selected external testers.
Long execution cycle may be required for Only a few weeks of execution are required for beta
alpha testing. testing.
Its purpose is to identify and fix issues Its purpose is to validate the product in real-world
before public release. conditions and get user feedback.
Stubs are dummy modules used to simulate Drivers are dummy modules used to simulate
low-level modules. high-level modules.
Software Testing 8
Stubs Drivers
Stubs are used when sub-programs are under Drivers are used when main programs are
construction. under construction.
Stubs are the called programs. Drivers are the calling programs.
Stubs are used in top-down approach. Drivers are used in bottom-up approach.
Stubs help test the main module by Drivers help test lower modules by
replacing missing sub-modules. replacing missing main modules.
A unit is the smallest part of software, typically with one or a few inputs and a single
output.
It is the level of software testing where individual components of software are tested.
Unit testing focuses on functionality and reliability of each module. The entry and exit
criteria are usually the same for all modules.
The main goal is to check if the smallest program of the software works as expected based
on the code.
✅
Illustrate process of bi-directional integration testing. State its two advantages and
disadvantages. (4M, W-23)
The bidirectional integration testing strategy combines both Top-Down and Bottom-Up
approaches.
In this method, top modules and lower modules are tested simultaneously, allowing
integration testing to occur in both directions.
This strategy is particularly beneficial for large projects with multiple subprojects and
is suitable for systems developed using a spiral model.
Advantages:
2. Suitable for spiral development models with large modules functioning like systems.
Disadvantages:
3. Only practical when individual subsystems are nearly as robust as the full system.
4. Requires testers with different skill sets for various levels of testing.
Software Testing 9
Security testing checks if an information system protects data and maintains
functionality at the same time.
3. Authentication: Verifies user identities to ensure that only legitimate users can
access the system.
5. Availability: Ensures the system remains accessible to authorized users when needed.
Security testing ensures the application is secure from data theft, unauthorized access,
and cyber threats, particularly on the web.
Areas Tested:
Data security
Password protection
Network security
Example:
A student management system is insecure if the admission branch can edit exam branch
data without proper authorization.
3. Sessions should automatically end after a period of inactivity to protect user data
from unauthorized access.
Testing is performed from the top-level modules down to the lower-level modules.
Higher-level modules are tested and integrated first, followed by the integration of
lower-level modules.
Modules are integrated from main modules to sub-modules, either in depth-first order or
breadth-first order.
Stubs are used to simulate the lower-level modules that are not yet developed or ready
for testing.
These stubs act as placeholders for missing modules, allowing testing to proceed without
waiting for the complete system.
Software Testing 10
Lower-level modules are tested and integrated first, followed by the integration of
higher-level modules.
Modules are integrated from sub-modules to main modules, either in depth-first order or
breadth-first order.
Drivers are used to simulate the higher-level modules that call the lower-level modules.
These drivers act as placeholders for missing higher-level modules, allowing testing to
proceed without waiting for their availability.
Describe Graphical User Interface (GUI) Testing and its important traits (4M, W-22, S-24) ✅
A computer application can have two types of interfaces:
2. Graphical User Interface (GUI) – where you interact with the system using images,
buttons, menus, and icons instead of typing commands.
GUI Testing is the process of checking these visual elements like screens, buttons,
menus, toolbars, and dialog boxes to ensure they function properly.
GUI Testing focuses on what the user sees, ensuring the layout and design work correctly.
1. Screen Validation – Ensure all fields and labels are displayed correctly.
2. Navigation – Verify that buttons, links, and other elements direct users to the right
place.
4. Data Integrity – Ensure data entered through the interface is correctly saved and
retrieved.
5. Object States – Verify elements (like buttons) change their state correctly (enabled,
disabled, etc.).
6. Field Formats – Ensure proper format for date, numeric, and other input fields.
A good GUI makes the app look nice and easy to use, which helps users like it more.
A well-designed interface gives users a better experience when using the app.
Consistent design and layout make it easier for users to understand and navigate the
app.
Explain Regression Testing. State when the Regression testing shall be done. (4M, W-23) ✅
Regression Testing is a type of testing used to confirm that recent changes in the
program or code have not negatively affected existing features.
It involves running previously executed test cases to ensure that the existing
functionalities still work correctly.
This testing ensures that new changes in the code don’t cause problems in the existing
functionality.
After Fixing Bugs: Run tests after fixing bugs to ensure no new problems occur.
When Adding New Features: Check that old features still work after adding new ones.
After Code Refactoring: Test to confirm that reorganizing the code doesn’t cause
issues.
Before Software Release: Perform testing before delivering the software to users or
moving it to production.
Software Testing 11
1. Retest All: This method involves re-running all test cases to ensure everything
functions correctly.
2. Regression Test Selection: Instead of testing all cases, this approach selects only
relevant test cases for re-execution.
3. Prioritization of Test Cases: Test cases are selected based on their priority or
business needs, focusing on the most important functionalities first.
✅
State approaches that are considered during Client Server Testing. (4M: W-19, 6M: W-23, S-
24)
The Client-Server application involves two systems: the Client and the Server. These two
systems communicate and interact with each other over a computer network.
In Client-Server application testing, the client requests specific information from the
server, and the server responds with the requested information. This process involves two
layers, which is why it is also called two-tier application testing.
1. Component Testing:
Use a client simulator for testing the server and a server simulator for testing the
client.
For testing the network, both simulators are used at the same time.
2. Integration Testing:
After testing the server, client, and network individually, they are combined for
system testing.
3. Performance Testing:
This checks how the system performs when many clients are communicating with the
server at once.
Volume testing and stress testing are used to test the system under both normal and
maximum loads.
4. Concurrency Testing:
This is important for client-server systems because multiple users may try to access
the same data at the same time.
Software Testing 12
Communication between the client and server can break due to various reasons like
server failure, client failure, or connection problems.
The system should have a plan for what happens in case of failure, and this needs to
be tested.
In a client-server application, the server is expected to run 24/7 for a long time.
Testing needs to be done for a long time to check if the network or server performance
gets worse over time due to any issues.
7. Compatibility Testing:
Servers may use different hardware, software, or operating systems than what is
recommended.
Testing should ensure that performance is maintained across different hardware and
software configurations.
Describe Load Testing and Stress testing. (4M: W-22, 6M: W-23) ✅
Load Testing:
Load testing checks how a system performs under increasing amounts of load until it
reaches its limit.
The load can come from more users or more transactions at the same time, measuring how
the system behaves under this pressure.
It is done in a controlled environment to see how different systems handle similar loads.
The main goal is to monitor the system’s response time and how well it works when there
is heavy use.
Load testing is successful if the system runs the test cases without errors within a set
time limit.
It tests the software under expected loads, like when many users or large files are being
processed.
Stress Testing:
Stress testing checks how a system behaves when there aren’t enough hardware resources,
like low memory or slow processors.
It is used to find the system's breaking point by testing with loads higher than
expected.
This is sometimes called "Fatigue Testing" because it pushes the system beyond its
limits.
Running a word processor with very low memory and disk space to see how the software
handles it.
Reducing resources like memory or CPU speed to see if the system can still function
without crashing or losing data.
Software Testing 13
Chapter 3 - Test Management (14 Marks)
Define Test Plan. (2M, S-23, S-24) ✅
A Test Plan is a detailed document that outlines the testing strategy, goals, schedule,
time estimates, deliverables, and resources needed to test a software product.
It helps determine how much effort is required to check the quality of the application
being tested.
The test plan acts as a guide for conducting software testing in an organized way, which
is closely monitored and controlled by the test manager.
2. Test Approach/Strategy: Deciding what types of testing will be done, like configuration,
integration, or localization.
3. Setting Test Criteria: Defining clear rules for when testing starts and ends, and how
different features will be tested.
4. Identifying Responsibilities, Staffing and Training needs: Deciding who will do what
tasks and what training is needed.
3. The plan helps determine the time, cost, and effort involved in testing.
These deliverables are given before, during, and after the testing phase.
Test Plan
Test Strategy
Test Scripts
Test Data
Test Results/Reports
Installation/Configuration Guides
Defect Reports
Release Notes
Test Plan describes how to check if the software meets its requirements and customer
needs. It includes goals for quality, the resources needed, the schedule, methods, and
tasks.
Software Testing 14
Test Cases outline the specific items to test and the steps to follow to verify the
software works as expected.
Bug Reports list problems found during testing. These reports can be written on paper or
kept in a database.
Metrics, Statistics, and Summaries show the progress of testing. They include charts,
graphs, and written reports to track how testing is going.
TCS give testers an idea of which scenarios will be tested, how they will be tested, and
how often they should be tested.
Test case specifications explain how to implement the test cases described in the test
plan.
They are useful because they provide detailed specifications of each test item.
TCS represents the requirements that need to be fulfilled by one or more actual test
cases.
Test Case ID
Pre-conditions
Steps
Input Data
Expected Result
Actual Result
Status (Pass/Fail)
✅
Describe Test Infrastructure Management/Components with diagram (4M, W-19, W-22, S-23, S-24)
The TCDB stores all important information about the test cases used in an
organization.
1. Test Case: Stores all the basic information about each test.
Software Testing 15
2. Test Case Product Cross-Reference: Links each test case to the feature it
tests.
3. Test Case Run History: Records when a test was run and the results.
4. Test Case-Defect Cross-Reference: Connects test cases with any defects found.
2. Defect Repository:
It includes:
It manages version control to ensure the correct versions of files and components
are used.
It ensures:
Changes to test files are made in a controlled fashion and only with proper
approvals.
Changes made by one test engineer are not accidentally lost or overwritten by
other changes.
Each change produces a distinct version of the file that is re-creatable at any
point in time.
Everyone gets access to only the most recent version of the test files.
State contents of Test Summary Reports used in Test Reporting / Describe process of
✅
preparing Summary Report in Test Planning (Both have same answer) (4M, W-19, W-22, S-22, S-24)
Test reporting helps communicate progress and results throughout the testing process.
1. Phase-wise Test Summary: This report is made at the end of each testing phase.
2. Final Test Summary Report: This combines the details of all phases into one report.
2. Description: A brief overview of the test items being reported, with their test IDs.
Software Testing 16
4. Summary of Results: A summary of all test results, including incidents that were
resolved and their solutions.
5. Assessment and Recommendation for Release: A final evaluation of whether the product
is ready for release, with a recommendation for moving forward.
Describe standards included in Test Management (Internal and External). (4M, W-19) ✅
Test management standards guide how testing activities are organized and executed.
Internal Standards:
Every test document (like test specifications, test cases, and test results) should
have a clear, meaningful name.
For example, module names could be M01, M02, and file types could be .sh or .SQL .
2. Documentation Standards:
Correct initialization.
Ensure that all stakeholders receive regular, consistent updates on test progress.
Reports should follow a standard format with specific details and content.
External Standards:
These are set by outside organizations and outline how the product should meet certain
requirements.
1. Customer Standards:
2. National Standards:
Defined by the regulatory bodies in the country where the supplier or customer
operates.
3. International Standards:
Prepare test plan for creating saving account at Bank (Also write Test Cases). ✅
Test Plan Identifier: TP_BA_001
Introduction:
This document outlines the test plan for the savings account creation process at the
bank.
The purpose is to ensure that the application functions correctly, is user-friendly, and
meets all regulatory requirements.
Software Testing 17
Test Items:
Account registration
User verification
Features to Be Tested:
Email/SMS notifications
Approach:
Regression testing
Pass/Fail Criteria:
The test report will be compiled and approved by the team lead and customer.
Test Deliverables:
Test Plan
Test Cases
Test Tasks:
Conducting tests
Documenting results
Environmental Needs:
Responsibilities:
Functionality Responsible
Software Testing 18
Familiarity with security practices
Schedule:
All testing activities and final delivery are due by 01/07/2025 by 5.00pm.
Approvals:
Test Manager
Quality Manager
Test Engineers
Test Case
Input Data Expected Result Actual Result
Description
Write the test cases for Notepad application (Any 8 test cases) (4M, W-22) ✅
Test Case
Steps Expected Result Actual Result
Description
Design Test Cases for withdraw amount from ATM (6M, S-22). ✅
Software Testing 19
Test Case Description Input Data Expected Result Actual Result
Introduction:
This document outlines the test plan for the identified mobile application, aimed at
ensuring the application meets its functional and non-functional requirements, is user-
friendly, and performs effectively across various devices.
Test Items:
User authentication
Push notifications
Features to Be Tested:
Data synchronization
In-app purchases
Search functionality
Approach:
Regression testing
Pass/Fail Criteria:
The test report will be compiled and approved by the team lead and customer.
Test Deliverables:
Software Testing 20
Test Plan
Test Cases
Test Reports
Test Tasks:
Executing tests
Documenting results
Environmental Needs:
Responsibilities:
Functionality Responsible
Schedule:
All testing activities and final delivery are due by 06/12/2019 at 5:00 PM..
Risks and Contingencies:
Approvals:
Test Manager
Test Engineers
✅
Design test cases for Online Mobile Recharge (Data filed are mobile number, state, email-id,
recharge amount.) (6M, S-22)
To check if the mobile Mobile Number: The mobile number should The mobile number is
number format is valid 9876543210 be valid valid
To check if the mobile The mobile number should The mobile number is
Mobile Number: 9876ABCD
number format is invalid be invalid invalid
Software Testing 21
Test Case Description Input Data Expected Result Actual Result
Mobile Number:
To check if the recharge An error message should An error message
9876543210,
process works with a appear: "Recharge amount appears: "Recharge
Email ID:
missing recharge amount is required" amount is required"
test@example.com
With respect to client-server testing design test cases for Online Payment Transfer at
banking system. (6M, S-22)
Test Case
Input Data Expected Result Actual Result
Description
Sender Account:
To check if the 1234567890, Receiver The client should send a
The server receives a
client initiates a Account: 9876543210, valid payment request to the
valid payment request
payment transfer Amount: 1000, Payment server
Method: Credit Card
Payment Request:
To check if the Sender Account: The server validates the
The server must validate the
server processes the 1234567890, Receiver payment details and
payment details and balance
payment request Account: 9876543210, confirms balance
Amount: 1000
Sender Account:
To check if the 1234567890, Receiver The client displays
The client must display
client handles Account: 9876543210, "Insufficient balance"
"Insufficient balance" error
insufficient balance Amount: 50000, Payment error
Method: Debit Card
Sender Account:
To check if the 1234567890, Receiver The client displays
The client must display
client receives a Account: 9876543210, "Payment Successful"
"Payment Successful" message
success confirmation Amount: 1000, Payment message
Method: Credit Card
Sender Account:
To check if the The server must deduct from
1234567890, Receiver The server updates both
server updates sender and add to receiver's
Account: 9876543210, accounts correctly
account balances account
Amount: 1000
Payment Request:
To check if the Sender Account:
The server must reject the The server rejects the
server validates 1234567890, Receiver
request with "Invalid request with "Invalid
payment request Account: 9876543210,
authentication" error authentication" error.
authenticity Amount: 1000, Invalid
Authentication Token
To add two integers and display the result 176 + 100 276 276
One digit
To delete digits one by one Press "DEL" One digit deleted
deleted
Design test cases for Railway Reservation System. (6M, W-19, S-23) ✅
Software Testing 22
Test Case Description Input Data Expected Result Actual Result
To verify login field Any valid login It should accept the login
It accepted the login name.
with valid credentials name (e.g., abcxyz) name.
To verify password
Any valid password It should accept the
field with valid It accepted the password.
(e.g., P@ssw0rd) password.
credentials
To verify password Any invalid An error message should An error message appeared
field with invalid password (e.g., appear indicating invalid indicating invalid
credentials 12345) credentials. credentials.
Prepare test plan for ‘Cam Scanner’ which is installed on mobile. (6M, W-22) ✅
Test Plan Identifier: TP_10
Introduction:
This document outlines the test plan for the CamScanner application installed on mobile
devices.
The primary objective of testing is to verify the correct operation of the application's
functionalities and its ease of use.
Test Items:
Scanning documents
Editing documents
PDF conversion
Features to be Tested:
Document Scanning
Document Editing
PDF Conversion
Approach:
Regression testing
Pass/Fail Criteria:
The test report will be compiled and approved by the team lead and customer.
Test Deliverables:
Test Plan
Software Testing 23
Test Cases
Test Report
Test Tasks:
Environmental Needs:
Mobile Phone
CamScanner Installed
Responsibilities:
Functionality Responsible
Schedule:
All tasks must be completed, and the project delivered by 25/01/2023 at 5:00 PM.
Approvals:
Team Lead
Test Engineer 1
Test Engineer 2
✅
Write a program for calculating even numbers from 1 to 20 and desing test cases for the
same. (6M, W-22)
Test Cases:
Check initial condition Initial value of for loop Initial value of for loop
Initial value
of for loop should be 0 or 1 is 1
Software Testing 24
Test Case Description Input Expected Result Actual Result
✅
Design test cases for Web pages testing of any Website (take a suitable example) (6M, W-22)
Check cursor position Click on email or Cursor should be placed Cursor placed
at email field mobile number field in the field correctly
Check cursor position Click on password Cursor should be placed Cursor placed
at password field field in the password field correctly
Check the continue Click on continue Should redirect to the Redirected to password
button functionality button password page page
Prepare six test cases for marketing site www.flipkart.com (6M, W-23) ✅
Test Case Description Steps Expected Result Actual Result
To check if the product The product should be added The product added to
Click on add to cart
is added to the cart to cart cart
To verify if the total The total amount of all The total amount of all
amount is displayed in Click on go to cart items in cart should be items in cart is
the cart displayed displayed
To check if the item is Click on remove from The item should be removed The item is removed from
removed from the cart cart from the cart the cart
✅
Prepare test plan along with test cases for Edit Notepad functionality. (6M: W-19, 4M: W-23)
Test Plan:
Introduction:
This document outlines the test plan for the EDIT functionality of Notepad.
Software Testing 25
The goal is to ensure the correct operation of all features and assess the application's
ease of use.
Test Items:
Features to Be Tested:
Cut Text
Paste Text
Delete Text
Copy Text
Accessing Help
Approach:
Regression Testing
Pass/Fail Criteria:
The test report will be compiled and approved by the team lead and customer.
Test Deliverables:
Test Plan
Test Cases
Test Report
Test Tasks:
Environmental Needs:
Notepad application
Computer
Windows OS
Responsibilities:
Functionality Responsible
Software Testing 26
Functionality Responsible
Schedule:
All tasks and project delivery are due by 06/12/2019 at 5:00 PM.
Approvals:
Team Lead
Test Engineer 1
Test Engineer 2
Test Engineer 3
Test Engineer 4
Test Cases:
Contents should be
Test the Paste option Click on "Paste" Contents are pasted
pasted
✅
With respect to GUI testing write the test cases for Amazon/Flipkart login form. (6M, W-19,
S-22)
Check the continue button Click on continue Should redirect to the Redirected to password
functionality button password page page
Software Testing 27
Write important six test cases for the ‘Login Form’ of the Facebook website. (6M, W-23) ✅
Test Case Description Input Data Expected Result Actual Result
Enter valid username and Username: abc123 It should display ‘Wrong It displays ‘Wrong
invalid password Password: 123 password’ message password’ message
Enter valid username and Username: abc123 It should display ‘Enter It displays ‘Enter
no password Password: N/A password’ password’
Enter valid username and Username: abc123 It should displays user's It displays user's
password Password: co5i22518 account's Facebook page account's Facebook page
Click on ‘Forgotten Click ‘Forgotten It should go to the Find It goes to the Find
password?’ password?’ your account page your account page
✅
Prepare test cases for College Admission form / Design test cases for Hostel admission form
(Both questions have same answer) (6M, W-19)
Submit form with age below Error message should Error message
DOB: 01/01/2008
the eligible limit appear for age restriction displayed
Form submitted
Name: Jay Kadlag
Submit form with valid data successfully, optional Form submitted
Email:
but optional fields blank fields should not affect successfully
jkcool11@gmail.com
submission
While designing and building the software, a programmer may make mistakes or errors.
These mistakes result in flaws within the software, which are called defects.
4. Unrealistic time schedule for development causes rushed work, leading to defects.
5. Multiple changes in the requirements lead to confusion and inconsistencies in the final
product.
Software Testing 28
2. Environment Details: Mention the software version, operating system, hardware, and other
relevant environment details where the defect was found.
3. Severity and Priority: Specify the severity (impact on functionality) and priority
(urgency to fix) of the defect.
4. Expected vs. Actual Results: Clearly state what was expected to happen and what actually
happened, highlighting the discrepancy.
These defects arise when the product doesn't meet the customer's needs. They can occur
due to:
Producer Gap: The development team fails to create the product according to the
requirements.
2. Design Defects:
Design defects occur when the system components, their interactions, or their
connection to external software/hardware are poorly designed.
3. Coding Defects:
These defects arise from improperly initialized or declared variables, or issues with
database creation.
Good coding also requires proper comments to ensure the code is readable and
maintainable.
4. Testing Defects:
These include problems with test cases and procedures, such as missing, incomplete, or
incorrect tests.
Draw Defect Prevention Process Cycle. State working of every phase. (4M, S-22) ✅
Start by identifying the critical risks that could affect the project or system.
These risks can include defects that might occur during the project.
Examples of Risks:
Software Testing 29
For each critical risk, evaluate the financial consequences if the risk becomes a
problem.
Where:
For risks that cannot be fully eliminated, work to decrease the chances of them
becoming issues.
Explain Defect Management Process with suitable diagram. (4M, W-23, S-23, S-24) ✅
1. Defect Prevention:
While it’s nearly impossible to eliminate all defects, the goal is to reduce the risk
of defects.
2. Deliverable Baseline:
Once a defect is fixed, retested, and confirmed as closed, the product is recreated.
If the newly created product meets the acceptance criteria, it is base lined.
Only base lined work products can move to the next stage of the process.
3. Defect Discovery:
The team should identify defects early before they become major issues.
Once a defect is found, it should be reported for resolution. Developers should also
acknowledge the defect as valid.
4. Defect Resolution:
The development team works to prioritize, schedule, and fix the defect, documenting
the resolution process.
This also includes notifying the tester to verify that the defect has been properly
resolved.
5. Process Improvement:
All defects are a result of failures in the processes used to create software.
Software Testing 30
Defects provide an opportunity to identify and address issues with the processes,
leading to improvements.
6. Management Reporting:
Analysis and reporting of defect information help management with tasks like risk
management, process improvement, and project management.
✅
Enlist any four attributes of defect. Describe them with suitable example. (4M: W-23, 2M: S-
23)
1. Defect ID:
2. Defect Name:
3. Project Name:
5. Severity:
6. Priority:
7. Summary:
8. Description:
9. Status:
Prepare defect report after executing test cases for any Login form. (4M, W-22) ✅
ID: F1
Product: http://www.facebook.com
Software Testing 31
Summary: Login fails with valid credentials, showing an error message.
Description: Users are unable to log in with valid credentials. The system displays an
error message despite entering correct login details.
Steps to Replicate:
Expected Results: The user should be successfully logged in and redirected to their
account's home page.
Actual Results: The system displays an error message saying "Invalid username or
password," even though the entered credentials are correct.
Remarks: This causes significant user inconvenience as they cannot access their accounts
even with correct credentials.
Status: Assigned
✅
State different techniques for finding defect and describe any one with example. (4M, W-19)
1. Static Techniques:
Static techniques check the software and related documents without running them. This
process is also known as desk checking, verification, or white box testing.
Reviewers use checklists, standards, and their own knowledge to find defects based on
set criteria.
It's called "static" because no code or product is executed. This technique ensures
the product meets the requirements.
Example: Reviewing code for proper formatting and naming conventions without actually
running it.
2. Dynamic Techniques:
Dynamic testing is a validation technique that involves running the software (or parts
of it) to compare its behavior with expected outcomes.
It includes black box testing methods like system testing and unit testing.
These tests evaluate if the product meets the requirements and design specifications,
marking it as "pass" or "fail".
Example: Running a login feature to check if a user can successfully log in with valid
credentials and fails with invalid ones.
3. Operational Techniques:
Operational techniques involve checking whether the processes used for development and
testing are being followed properly and are effective.
This includes auditing work products and revisiting defects before and after fixing.
It may also involve quick tests like smoke testing and sanity testing to check if the
product works as expected.
Example: Performing smoke testing to ensure the basic functionalities of an app work
after a new feature is added, like checking if the homepage loads without errors after
a minor update.
Software Testing 32
Describe Defect Life Cycle with neat diagram. (6M, W-23) ✅
1. New: This is the initial state when a defect is posted for the first time.
2. Assigned: After a tester posts a bug, the tester’s lead checks that the bug is valid and
assigns it to the appropriate developer or development team.
3. Open: In this state, the developer has started to analyze and work on fixing the defect.
4. Test/Retest: At this stage, the tester retests the updated code provided by the developer
to see if the defect has been fixed.
6. Rejected: If the developer believes that the defect is not valid, they can reject it,
changing its status to "rejected".
7. Reopen/Reassigned: If the defect still exists after the developer has claimed to fix it,
the tester can change the status to "reopened", and the defect will go through the
lifecycle again.
8. Verified: After retesting the defect and confirming it has been fixed, the tester changes
the status to "verified".
9. Closed: Once the defect is fixed and tested by the tester, if everything is satisfactory,
the status is changed to "closed". This means the defect is resolved, tested, and
approved.
Prepare defect report for Library Management System. (With Test cases). (6M, S-24) ✅
Defect Report for Library Management System:
ID: L1
Product: http://www.librarysystem.com
Summary: Unable to borrow books, error message displayed when trying to borrow more than
3 books.
Description: Users are unable to borrow more than 3 books at a time due to an error
message being displayed.
Steps to Replicate:
Expected Results: Users should be able to borrow up to the allowed limit (e.g., 5 books),
or the system should display an appropriate error message when the limit is exceeded.
Software Testing 33
Actual Results: The system displays an error message and blocks the borrowing process for
more than 3 books.
Remarks: Causes inconvenience as users are unable to borrow up to the maximum allowed
books.
Status: Assigned
Test Case
Actual Input Expected Output Actual Output
Description
1. Enter Username:
Verify user login
"22203A0011" Login should be done Login is done
with valid
2. Enter Password: successfully. successfully.
credentials
"sandip@1234"
1. Enter Username:
Verify user login It should display message It is displaying message
"22203A0011"
with invalid "Invalid Username or "Invalid Username or
2. Enter Password:
credentials Password." Password."
"wrongpassword"
1. Book is issued to
1. Book should be issued to
Issue a book with Enter Book Name: "Data student. 2. Book is marked
student.
a valid name structure using C" as borrowed in the
2. Book marked as borrowed.
database.
Check message for Enter Book Name: "Data It should display message It is displaying message
unavailable book structure and algorithm" "Book not available." "Book not available."
✅
Prepare defect report after executing test cases for withdraw of amount from ATM Machine.
(6M, W-22)
ID: R1
Product: http://www.motc.gov.qa/en/ditoolkit/cash-machine-simulator-atm
Module: Home Page > Our Programs > Digital Inclusion Tools
Steps to Replicate:
Software Testing 34
1. Open the website.
Actual Results: The simulator displays only limited options for cash withdrawal
denominations.
Attachments:
Remarks: Causes inconvenience to the user in terms of limited cash withdrawal options.
Status: Assigned
✅
Draw diagram for Defect Life Cycle and write example for Defect Template. (6M, W-19, S-24)
ID: R1
Product: http://www.motc.gov.qa/en/ditoolkit/cash-machine-simulator-atm
Module: Home Page > Our Programs > Digital Inclusion Tools
Software Testing 35
Summary: Limited options for cash withdrawal denominations, restricting withdrawals to a
maximum of 3000.
Steps to Replicate:
Actual Results: The simulator displays only limited options for cash withdrawal
denominations.
Attachments:
Remarks: Causes inconvenience to the user in terms of limited cash withdrawal options.
Status: Assigned
2. Test complete
3. LoadRunner
4. Cucumber
6. Cypress
2. Consistency: Tests can be repeated exactly the same way every time, reducing human errors
like forgetting steps or making mistakes, which helps identify defects accurately.
Software Testing 36
3. Simulated Testing: Tools can create multiple virtual users or data sets, allowing for
effective testing in a controlled environment before the product is released.
4. Test Case Design: Automated tools can help design test cases, ensuring better coverage
compared to manual testing.
5. Reusability: Automated tests can be reused across different software versions, even if
the user interface changes.
6. Error Reduction: Automation reduces the likelihood of human errors that can occur during
manual testing.
7. Internal Testing: Tools can easily check for issues like memory leaks and test coverage.
8. Cost Reduction: By speeding up the testing process, automation can lower overall costs
associated with software development.
State the Need of Automated testing tools. (2M: W-22, S-24, 4M: S-22) ✅
An automated testing tool can replay recorded actions, compare results to expected
behavior, and report success or failure to a test engineer.
Once automated tests are created, they can be easily repeated and extended to perform
tasks that manual testing can't handle.
Once automated tests are set up, they can be run repeatedly at no extra cost and are much
faster than manual tests.
Automated testing improves accuracy, as even careful testers can make mistakes during
tedious manual testing.
Automated tests perform the same steps precisely every time and always record detailed
results. They can also run on multiple computers with different setups.
Give any four differences between manual and automated testing. (S-24) ✅
Manual Testing Automation Testing
Test cases are executed manually. Test cases are executed with the help of tools.
Time required to execute test cases is high. Time required to execute test cases is low.
State and explain any four benefits of Automation in testing. (4M, W-23) ✅
1. Reduces Testing Time:
Automated tests, once created, can run repeatedly at no extra cost and much faster
than manual tests.
2. Improves Accuracy:
Automated tests perform tasks with consistent precision, reducing human errors.
Software Testing 37
4. Allows Testing with Different Data and Configurations:
Automated tests can run multiple times with various inputs and across different
devices or configurations.
Thousands of test cases can be executed in a single run, which is not feasible with
manual testing.
5. Saves Resources:
Automated testing tools create reusable test scripts, eliminating the need to write or
execute tests manually, saving both time and effort.
State eight limitations of Manual Testing. (4M, W-19, W-22, W-23, S-22, S-23, S-24) ✅
1. Slow and Expensive: It takes a lot of time and costs more.
2. Labor-Intensive: Testing manually requires a lot of effort and takes a long time to
finish.
3. Doesn't Scale Well: As the software becomes more complex, testing becomes much harder and
takes even more time and money.
4. Inconsistent Results: Manual tests can vary because different testers may perform the
same test in different ways, leading to inconsistent results.
5. Lack of Training: Many testers may not be properly trained, which affects the quality of
testing.
6. Difficult to Spot Small GUI Issues: It’s hard to notice small differences in object sizes
and color combinations manually.
7. Not Suitable for Large or Time-Sensitive Projects: Manual testing is inefficient for big
or urgent projects.
8. No Batch Testing: Every test needs human interaction; there’s no way to automate multiple
tests at once.
9. Hard to Compare Large Data Sets: It’s impractical to manually compare large amounts of
data.
10. Slow Maintenance Changes: Processing changes during software maintenance takes more time
with manual testing.
✅
Enlist factor considered for selecting testing tool for Test Automation. (4M, W-19, W-22, W-
23, S-22, S-23)
1. Assess the organization’s readiness for change: Check if the organization is prepared to
adapt new tools and processes.
2. Identify areas where the tool can improve testing processes: Figure out which parts of
the organization will benefit from tool support to make testing better.
3. Evaluate tools based on clear requirements and criteria: Compare tools against specific
needs and objective standards.
4. Do a proof-of-concept: Test the tool to see if it works as expected and meets the goals
set for it.
5. Evaluate the vendor or open-source support: Check the quality of vendor services, such as
training and support, or the community support if it's an open-source tool.
6. Plan for internal implementation: Make a plan for introducing the tool, including
training and mentoring for those who are new to it.
Lines of Code (LOC): Measures the overall system size, indicating the amount of work
completed. Used to estimate time and costs.
Effective Lines of Code (eLOC): Measures only the lines of code that contain actual
code, excluding comments and blank lines, providing a better idea of the work done.
Software Testing 38
Comment Line and Comment Percent: Measures the amount of comments in the code. Proper
commenting is essential for easier maintenance. A minimum of 20% comments is
recommended.
Blank Line and White Space Percent: Measures blank lines in code, which affects
readability.
File Count Metric: Counts files based on file extensions, showing the distribution of
source code types.
2. Procedural Metrics:
Cyclomatic Complexity: Measures the number of decision points (like “if”, “for”,
“while”) in a function. Helps identify areas that need inspection, redesign, or more
testing.
3. Class Metrics:
Class Volume: Measures the amount of information within a class, using the number of
variables and methods.
Average LOC per Class/Method: Measures the size of a class or method, helping to
understand system complexity.
Method Metrics:
Maximum Nesting Level: Measures how deep the nesting of statements is within a
method.
Coupling Metrics:
Afferent Coupling: Measures how many other methods depend on a given method.
Efferent Coupling: Measures how many methods a given method depends on. Keeping
this low improves stability.
4. Inheritance Metrics:
Height of Inheritance Tree: Measures how deep a class is in the inheritance hierarchy.
A deeper hierarchy means more inherited methods, increasing complexity.
1. Time-Saving: Automated testing tools can execute tests faster than humans, allowing
testers to focus on other important tasks.
2. Consistency: Tests can be repeated exactly the same way every time, reducing human errors
like forgetting steps or making mistakes, which helps identify defects accurately.
3. Simulated Testing: Tools can create multiple virtual users or data sets, making it
possible to test in a controlled environment before the product is released.
4. Better Test Case Design: Automated tools can help design test cases, ensuring better
coverage compared to manual testing.
5. Reusability: Automated tests can be reused across different software versions, even if
the user interface changes.
6. Error Reduction:Automation helps to minimize human errors that can occur during manual
testing.
7. Internal Testing: Tools can easily check for issues like memory leaks and test coverage.
8. Cost Reduction: By speeding up the testing process, automation can reduce overall costs
of software development.
Software Testing 39
2. Misjudged Efforts: Underestimating the time and resources needed to implement tools can
lead to frustration.
3. Maintenance Challenges: Maintaining automated tests can require more effort than
expected.
4. Over-Reliance: Relying too much on tools can lead to neglecting important manual testing
practices.
Elaborate term Metrics and Measurement and write need of Software Measurement. (6M, W-19) ✅
A metric is a measurement of the degree that any attribute belongs to a system, product,
or process.
For example, counting the number of errors per hour of work is a metric.
Software Metrics are specific metrics used to evaluate the quality of a software project.
Design test cases for MS word application using an Automation tools. (6M, W-22) ✅
Test Case Description Input Data Expected Result Actual Result
Check whether Undo in Edit main Perform any action, then Previous action Previous action
menu undoes the previous action click Undo in the Edit menu should be undone was undone
The above test cases will be executed on automation tools like AutoIT, QTP, etc.
Software Testing 40