Introduction To Software Testing
Introduction To Software Testing
Types of Software Testing mainly categorized into the two domain, which
are below.
1. Manual Testing
Manual Testing is a software testing technique in which test cases are executed manually
without using automation tools. In this method, testers check the software by performing
different actions like clicking buttons, entering data, and verifying outputs. The tester
compares the actual result with the expected result to identify defects or errors in the
application.
Features of Manual Testing
No automation tools are required.
Testing is performed by human testers.
Suitable for small projects and user interface testing.
Helps in understanding the look and feel of the application.
Example
Suppose a tester wants to test the login page of a college website.
Test Scenario: Verify whether the user can log in successfully.
Steps:
1. Open the login page.
2. Enter username and password manually.
3. Click the Login button.
4. Check whether the homepage opens successfully.
ExpectedResult:
The user should successfully log in and reach the homepage.
ActualResult:
If the homepage opens correctly, the test case is passed; otherwise, it is failed.
2. Automation Testing
Automation Testing is a software testing technique in which testers use automation tools and
scripts to test software applications automatically. In this method, repetitive test cases are
executed using tools without continuous human involvement. It helps save time, improves
accuracy, and increases testing speed.
Features of Automation Testing
Uses automation tools like Selenium, Appium, and JMeter.
Suitable for repetitive and large-scale testing.
Faster and more accurate than manual testing.
Reduces human effort and errors.
Example
Suppose a tester wants to test the login functionality of an online shopping website multiple
times.
Using an automation tool like Selenium, the tester writes a script to:
1. Open the browser automatically.
2. Enter username and password.
3. Click the Login button.
4. Verify whether the homepage opens successfully.
The script can run repeatedly without manual work.
ExpectedResult:
The system should log in successfully every time the script runs.
Difference Between Manual Testing and Automation Testing
Suitable for small projects Suitable for large and repetitive testing
1. Functional Testing
Functional Testing is a type of software testing that verifies whether the application works
according to the specified requirements. It focuses on checking the features, functions, and
user interactions of the software. In this testing, the tester validates whether the input given to
the application produces the correct output.
Example
Steps:
Expected Result:
The user should successfully log in and reach the homepage.
If the login works correctly according to the requirement, then the functional test is passed.
2. Non-Functional Testing
Example
Test Scenario: Check whether the website can handle 10,000 users at the same time.
Expected Result:
The application should work smoothly without crashing or slowing down.
If the system maintains good performance and stability, the non-functional test is successful.
Difference Between Functional and Non-Functional Testing
Black Box Testing is a software testing technique in which the tester checks the functionality
of the application without knowing the internal code or program structure. The tester focuses
only on inputs and expected outputs to verify whether the software works according to
requirements.
Example
Steps:
In this testing, the tester does not know how the login code is written internally. The tester
only checks whether the functionality works correctly.
White Box Testing is a software testing technique in which the tester has knowledge of the
internal code, logic, and structure of the program. It focuses on testing loops, conditions,
branches, and code paths to ensure that the program works correctly internally.
Example
Expected Result:
The code should correctly validate passwords for all conditions.
In White Box Testing, the tester checks the internal working of the program along with the
output.
Unit testing mainly focuses on testing the smallest part of the application independently
before integrating it with other modules.
1. Banking Applications
Interest calculation
Loan eligibility checking
Transaction validation
Example
A banking application checks whether interest is calculated correctly for a savings account.
2. E-Commerce Systems
3. Authentication Systems
Login validation
Password strength checking
Token generation
In this step, developers write unit test cases for a specific function or method.
Activities
Example
The created test cases are reviewed by senior developers or team members.
Activities
Example
Checking whether test cases include both valid and invalid inputs.
After review, the approved test cases are finalized and stored as the standard version.
Activities
Example
The final approved login test cases are committed to the project repository.
In this step, the baselined test cases are executed to verify application behavior.
Activities
Manual Testing involves developers testing individual code units by hand without using
automated tools. Although simple to perform, it is rarely used in modern development due to
inefficiency and high maintenance [Link] costs more because workers have to be paid for
the time they spend testing, especially if they're not permanent staff.
Time-consuming and costly, especially when tests must be repeated after every code
change.
testing.
Automation Unit Testing checks software functionality automatically using testing tools and
frameworks, reducing manual effort and improving accuracy. Developers write small test
cases to validate individual functions, which run during development but not in production.
Developers write a small piece of code to test a function in the software. This code is like a
Tests focus on single units, run in memory, and do not depend on external systems.
Automated unit tests are commonly integrated into build and CI/CD pipelines to
Choosing unit test cases is an important step in software testing. Unit testing checks whether
individual components or functions of a program work correctly. Proper selection of test
cases helps in finding errors early and improves software quality.
Before writing test cases, clearly understand the functionality of the module or function. The
test cases should verify whether the unit performs according to the given requirements and
expected behavior.
2. Test Normal Inputs: Include test cases with valid and expected inputs. These test cases
ensure that the program produces correct output under normal working conditions.
Example:
If a function adds two numbers, test with values like 10 and 20.
3. Test Boundary Values: Boundary value testing checks the behavior of the program at the
limits of input ranges. Errors often occur at minimum and maximum values.
Example:
If the valid age range is 1–100, test values such as 1, 100, 0, and 101.
4. Test Invalid Inputs: The unit should also handle incorrect or unexpected inputs properly.
Invalid test cases help verify error handling and robustness.
Example:
Entering characters instead of numbers in a numeric field.
5. Test Special Cases: Special conditions such as empty inputs, null values, or duplicate
values should be tested because they may cause failures in the program.
Example:
Testing a login form with empty username and password fields.
6. Test All Logical Paths: Every condition, loop, and decision statement in the code should
be tested at least once. This ensures complete coverage of the program logic.
7. Use Equivalence Class Partitioning: Inputs are divided into valid and invalid groups
called equivalence classes. One test case from each class is selected to reduce the number of
test cases while maintaining effectiveness.
8. Check Error Handling: Test cases should verify whether proper error messages or
exceptions are generated when failures occur. This improves reliability and user experience.
9. Repeatability of Test Cases: A good unit test case should produce the same result every
time it is executed with the same input. Repeatable tests help in debugging and maintenance.
10. Maintain Simplicity: Test cases should be simple, clear, and easy to understand.
Complex test cases are difficult to maintain and may create confusion during testing.
Test Planning: Test is planned according to the analysis of the requirements of the
user.
Test Specification: In this section it is specified that which test case must be run and
which test case should be skipped.
Test Execution: Once the test cases are specified according to the user requirements,
test cases are executed.
Test Recording: Test recording is the having record of the defects that are detected.
Test Verification: Test verification is the process to determine whether the product
meet specification.
Completion: This is the last phase of the testing process in which the result is
analyzed.
Performed
Developers Developers or Testers
By
3. System Testing
System Testing is a type of software testing that is performed on a completely integrated
system to evaluate the compliance of the system with the corresponding requirements. In
system testing, integration testing passed components are taken as input.
The goal of integration testing is to detect any irregularity between the units that are
integrated. System testing detects defects within both the integrated units and the
whole system. The result of system testing is the observed behaviour of a component
or a system when it is tested.
It is performed to test the system beyond the bounds mentioned in the software
requirements specification (SRS). System Testing is performed by a testing team that
is independent of the development team and helps to test the quality of the system
impartial.
It has both functional and non-functional testing. System Testing is performed after
the integration testing and before the acceptance testing.
write Automation Tests before the actual development process starts, which is coding. Here
we are learning TDD in detail with these important points related to the same.
History of TDD
TDD shares similarities with test-first programming from Extreme Programming, which
started in 1999. However, TDD has gained more widespread interest on its own.
Programmers also use TDD to improve and fix old code written with different methods.
The idea of Test-Driven Development (TDD) which invented from an old book
on Programming. In this suggested method you will manually enter the expected output and
then write a code until the actual output when matches it. After creating the first xUnit
framework, We will remember this and give it a try which is related to the the invention of
the TDD for me.
Run all the test cases and make sure that the new test case fails.
Red - Create a test case and make it fail, Run the test cases
Green - Make the test case pass by any means.
Refactor - Change the code to remove duplicate/redundancy and Refactor code - This
is done to remove duplication of code.
Once you completed through the Red-Green-Refactor cycle, you continue repeating the
process for the next piece of functionality or unit of code. Every time you write a new test,
your code gets better and more reliable, making the overall software stronger.
Approaches of Test Driven Development (TDD)
There are two main approaches to TDD: Inside Out and Outside In.
1. Inside Out:
In Test-Driven Development (TDD), you begin by testing the smallest units of code, such as
individual functions or methods. Inside Out approach is also known as the Detroit School of
TDD or Classicist.
Focuses on testing the smallest units first and building up from there.
The architecture of the software emerges naturally as tests are written.
Design and architecture are refined during the refactor stage, which can sometimes
lead to significant changes.
Easier to learn for beginners.
Minimizes the use of mocks.
Helps prevent over-engineering.
2. Outside In:
Outside In approach known as the London School of TDD or Mockist. It will focuses on
testing user behavior and interactions.
Testing starts at the outermost level, such as the user interface, and works inward to
the details.
Relies heavily on mocks and stubs to simulate external dependencies.
Harder to learn but ensures the code meets overall business needs.
Design is considered during the red stage, aligning tests with business requirements
from the start.
What is Release Testing?
Release testing is the process of authenticating that a specific release of a software product
fulfills the specified requirements. It ensures that the release of a software product is “ready
for release” to the end users. It is carried out to detect and eliminate any defects, bugs, or
issues that may have been left unattended during the development process.
Why Perform Release Testing?
The key objective of a release test is to authenticate that the software works as per
plan and fulfills the stipulated requirements.
It helps in identifying errors and eliminates the defects leading to failures.
Release test facilitates the implementation of tests at different levels. Thus, it leads to
fewer errors and also fulfills the customer’s needs.
It guarantees software compatibility with various hardware configurations, operating
systems, and other software products.
It assesses software’s performance under different contexts, including stress testing
and peak usage.
It ensures that the software fulfills stated data privacy and security requirements.
It makes the software more reliable and stable.
It curtails the odds of customer complaints and enhances customer satisfaction.
Types of Release Testing
You can choose from different types of release tests to authorise the release of a software
product. Here are the details of these types:
Functional Testing:
This testing validates the software system against the functional specifications. It involves
testing individual functionalities and features and testing the software product overall.
Performance testing:
It evaluates the software product’s reliability, performance, speed, scalability, stability,
resource consumption, and responsiveness of an application under load.
Security Testing:
It evaluates threats, vulnerabilities, and risks in a software application. It prevents hackers
from accessing crucial data before the software product is released. Moreover, it avoids
malicious attacks from intruders. It aims to recognize all potential weaknesses and loopholes
of the software system that may lead to loss of revenue and data.
Compatibility Testing:
This release test technique checks whether software can operate on various hardware,
applications, browsers, mobile devices, network environments, or operating systems.
Usability testing:
It evaluates the software product’s utility and user experience. It tests the software product’s
ease of use, navigation, and user experience. Moreover, it aims to detect any utility issues,
gather quantitative and qualitative data, and understand the user’s satisfaction with the
software product.
Regression testing:
It helps validate that a code change in the software doesn’t influence the existing utility of the
software product. It ascertains that the software product works well with the newly
implemented features, any modifications in the existing features, or bug fixes.
Automated testing:
This release test technique automatically performs testing using software tools and scripts. It
involves different testing activities like functional testing, security testing, performance
testing, and others. Its key benefit is that it can be performed more consistently and quickly
than manual testing. So, it lets you detect issues earlier during software development.
Unit testing:
Unit testing focuses on individual components or units of a software system. It aims to
validate that each component/unit of the software functions as intended and fulfils the
requirements. The unit tests are automated and executed every time the code is modified. So,
they ensure that the new code doesn’t breach the existing functionality.
End-to-end testing:
End-to-end (E2E) testing verifies the working structure of a software product in a start-to-
finish process. It authenticates that all units of a system can execute under real-life situations.
Benefits of Release Test
Improves software product quality and performance:
This test helps to detect and solve any defects or issues in the software prior to its release.
Hence, it always ensures high-quality software products. Moreover, it assures that the
software functions as intended under different conditions. So, it leads to overall better
performance and user experience.
Increases teamwork efficiency:
This test frequently entail collaboration between different departments and teams.
Consequently, it leads to improved teamwork and communication. This helps the team
members work more efficiently.
Decreases risks:
The ability to find and fix bugs in the testing process allows this tests to minimise the risk of
lost business, user complaints, and deterioration of the organisation’s prestige in the market.
Cost-effective:
It is less expensive to fix bugs in the testing phase compared to fixing them after the software
has been released.
Increases customer satisfaction:
Effective release test of a software product suggests that it will have fewer issues. Therefore,
it increases the likelihood of fulfilling the users’ requirements and expectations and thus
increases customer satisfaction.
Better project management:
With the help of this test, you can determine the required resources, tasks, and schedules
contributing to an effective software release. So, it lets you better plan and manage the
project.
User Testing:
User Testing is a type of software testing in which real users test the software application to
check whether it meets their requirements and works correctly in real-world conditions. It
helps developers understand how users interact with the system and identify usability
problems, errors, or missing features before the software is released.
Objectives of User Testing
1. To verify that the software satisfies user requirements.
2. To identify usability issues and user difficulties.
3. To improve user satisfaction and user experience.
4. To ensure the system works properly in a real environment.
5. To detect defects that developers may not notice during development.
User Testing Process
1. Identify target users.
2. Prepare test scenarios and test cases.
3. Provide the software to users.
4. Observe user interaction with the system.
5. Collect feedback and error reports.
6. Fix defects and improve the application.
7. Retest the software if necessary.
Advantages of User Testing
Improves software quality.
Enhances user satisfaction.
Detects real-world usability problems.
Reduces chances of software failure after release.
Helps in improving interface and functionality.
Disadvantages of User Testing
Requires time and cost.
Feedback may vary from user to user.
Difficult to manage large numbers of users.
Some users may not provide proper feedback.
┌──────────────┐
│ Developers │
└──────┬───────┘
│
▼
┌─────────────────┐
│ Software Build │
└──────┬──────────┘
│
▼
┌─────────────────┐
│ Real Users │
│ Test the System │
└──────┬──────────┘
│
▼
┌─────────────────┐
│ Collect Feedback │
└──────┬──────────┘
│
▼
┌─────────────────┐
│ Bug Fixing and │
│ Improvements │
└─────────────────┘
Alpha and Beta Testing:
Alpha Testing and Beta Testing are part of software development life cycle.
Alpha and Beta testing are types of User Acceptance Testing (UAT). Alpha
Testing happens in the early stages of SDLC and is performed internally by the
development team while Beta testing happens later in the SDLC, just before
product release, and is performed by potential customers, industry experts, or
public beta testers.
What is Alpha Testing?
Alpha Testing is a type of software testing performed to identify bugs before
releasing the product to real users or to the public. Alpha Testing is one of the
user acceptance tests. It is the first stage of software testing, during which the
internal development team tests the program before making it available to
clients or people outside the company.
Work Done by Developers: The internal development team, which
consists of developers and testers, usually conducts alpha testing in a
controlled setting.
Goal: Finding and fixing bugs, flaws, and usability issues is the main
goal before releasing the product for external users or wider testing.
Little User Engagement: Alpha testers are few in number and frequently
comprise members of the development team or those intimately
connected to the project.
Environment: Alpha testing is typically carried out in a development
environment or laboratory that resembles actual settings.
Beta testing is performed in real-world environments where actual users use the
software in their daily activities. This helps developers understand how the program
works under normal usage conditions and identify any remaining issues before the
final release.
For example, a mobile app may be given to selected users to use on their own phones
and internet connections before it is officially launched.
Parameters
Alpha Testing Beta Testing
Alpha testing is
Beta testing is
performed by testers
performed by clients
who are usually
who are not part of the
internal employees of
Performed by organization.
the organization.