Unit - 1 Software Testing (Complete Notes)
Unit - 1 Software Testing (Complete Notes)
UNIT – 1
What is Software Testing ?
Definition:
Software Testing Definition according to ANSI/IEEE 1059 standard – A process
of analyzing a software item to detect the differences between existing and required
conditions (i.e., defects) and to evaluate the features of the software item.
Testing Methods:
1. Static Testing
2. Dynamic Testing
Static Testing: It is also known as Verification in Software Testing. Verification is a
static method of checking documents and files. Verification is the process, to ensure
that whether we are building the product right i.e., to verify the requirements which
we have and to verify whether we are developing the product accordingly or not.
Activities involved here are Inspections, Reviews, Walkthroughs
Testing Approaches:
There are three types of software testing approaches.
• White Box Testing: It is also called as Glass Box, Clear Box, Structural
Testing. White Box Testing is based on application’s internal code structure.
In white-box testing, an internal perspective of the system, as well as
programming skills, are used to design test cases. This testing is usually done
at the unit level.
• Black Box Testing: It is also called as Behavioral/SpecificationBased/Input-
Output Testing. Black Box Testing is a software testing method in which
testers evaluate the functionality of the software under test without looking at
the internal code structure.
• Grey Box Testing: Grey box is the combination of both White Box and Black
Box Testing. The tester who works on this type of testing needs to have access
to design documents. This helps to create better test cases in this process.
Testing Levels:
1. Unit Testing
2. Integration Testing
3. System Testing
4. Acceptance Testing
• Unit Testing: Unit Testing is done to check whether the individual modules
of the source code are working properly. i.e. testing each and every unit of the
application separately by the developer in the developer’s environment.
It is AKA Module Testing or Component Testing. To learn about Unit Testing,
check out our detailed Unit Testing Guide
• Integration Testing: Integration Testing is the process of testing the
connectivity or data transfer between a couple of unit tested modules. It is
AKA I&T Testing or String Testing. It is subdivided into the Top-Down
Approach, Bottom-Up Approach, and Sandwich Approach (Combination of
Top-Down and Bottom-Up). To learn about Integration Testing, check out our
detailed Integration Testing Guide
• System Testing (end to end testing): It’s a black box testing. Testing the fully
integrated application this is also called as an end to end scenario testing. To
ensure that the software works in all intended target systems. Verify thorough
testing of every input in the application to check for desired outputs. Testing
of the user’s experiences with the application.
• Acceptance Testing: To obtain customer sign-off so that software can be
delivered and payments received. Types of Acceptance Testing are Alpha,
Beta & Gamma Testing.
Testing Artifacts:
Test Artifacts are the deliverables that are given to the stakeholders of a software
project. A software project which follows SDLC undergoes the different phases
before delivering to the customer. In this process, there will be some deliverables in
every phase. Some of the deliverables are provided before the testing phase
commences and some are provided during the testing phase and rest after the testing
phase is completed.
• Test plan
• Traceability matrix
• Test case
• Test script
• Test suite
• Test data or Test Fixture
• Test harness
Some of the reasons why software testing becomes a very significant and integral
part in the field of information technology are as follows.
1. Cost-effectiveness
2. Customer Satisfaction
3. Security
4. Product Quality
1. Cost-effectiveness
As a matter of fact, design defects can never be completely ruled out for any complex
system. It is not because developers are careless but because the complexity of a
system is intractable. If the design issues go undetected, then it will become more
difficult to trace back defects and rectify it. It will become more expensive to fix it.
Sometimes, while fixing one bug we may introduce another one in some other
module unknowingly. If the bugs can be identified in the early stages of development
then it costs much less to fix them. That is why it is important to find defects in the
early stages of the software development life cycle. One of the benefits of testing is
cost-effectiveness.
It is better to start testing earlier and introduce it in every phase of the software
development life cycle and regular testing is needed to ensure that the application is
developed as per the requirement.
2. Customer Satisfaction
In any business, the ultimate goal is to give the best customer satisfaction. Yes,
customer satisfaction is very important. Software testing improves the user
experience of an application and gives satisfaction to the customers. Happy
customers mean more revenue for a business. One of the reasons why software
testing is necessary is to provide the best user experience.
3. Security
This is probably the most sensitive and vulnerable part of software testing. Testing
(penetration testing & security testing) helps in product security. Hackers gain
unauthorized access to data. These hackers steal user information and use it for their
benefit. If your product is not secured, users won’t prefer your product. Users always
look for trusted products. Testing helps in removing vulnerabilities in the product.
4. Product Quality
Software Testing is an art that helps in strengthening the market reputation of a
company by delivering the quality product to the client as mentioned in the
requirement specification documents.
Missing: A requirement of the customer that was not fulfilled. This is a variance
from the specifications, an indication that a specification was not implemented, or a
requirement of the customer was not noted correctly.
Extra: A requirement incorporated into the product that was not given by the end
customer. This is always a variance from the specification, but may be an attribute
desired by the user of the product. However, it is considered a defect because it’s a
variance from the existing requirements.
ERROR: An error is a mistake, misconception, or misunderstanding on the part of
a software developer. In the category of developer we include software engineers,
programmers, analysts, and testers. For example, a developer may misunderstand a
de-sign notation, or a programmer might type a variable name incorrectly – leads to
an Error. It is the one which is generated because of wrong login, loop or due to
syntax. Error normally arises in software; it leads to change the functionality of the
program.
BUG: A bug is the result of a coding error. An Error found in the development
environment before the product is shipped to the customer. A programming error that
causes a program to work poorly, produce incorrect results or crash. An error in
software or hardware that causes a program to malfunction. Bug is terminology of
Tester.
FAILURE: A failure is the inability of a software system or component to perform
its required functions within specified performance requirements. When a defect
reaches the end customer it is called a Failure. During development Failures are
usually observed by testers.
FAULT: An incorrect step, process or data definition in a computer program which
causes the program to perform in an unintended or unanticipated manner. A fault is
introduced into the software as the result of an error. It is an anomaly in the software
that may cause it to behave incorrectly, and not according to its specification. It is
the result of the error.
• Unit Testing
It is a method by which individual units of source code are tested to determine
if they are fit for use.
• Integration Testing
Here individual software modules are combined and tested as a group.
• Functionality Testing
It is a type of black box testing that bases its test cases on the specifications
of the software component under test. • Usability Testing
It is a technique used to evaluate a product by testing it on users.
• System Testing
It is testing conducted on a complete, integrated system to evaluate the
system’s compliance with its specified requirements.
• Performance Testing
It is testing that is performed, to determine how fast some aspect of a system
performs under a particular workload.
• Load Testing
It refers to the practice of modeling the expected usage of a software program
by simulating multiple users accessing the program concurrently.
• Stress Testing
It is a form of testing that is used to determine the stability of a given system
or entity.
Debugging :
In the context of software engineering, debugging is the process of fixing a bug in
the software. In other words, it refers to identifying, analyzing and removing errors.
This activity begins after the software fails to execute properly and concludes by
solving the problem and successfully testing the software. It is considered to be an
extremely complex and tedious task because errors need to be resolved at all stages
of debugging.
Debugging Process: Steps involved in debugging are:
• Problem identification and report preparation.
• Assigning the report to software engineer to the defect to verify that it is genuine.
• Defect Analysis using modeling, documentations, finding and testing candidate flaws, etc.
• Defect Resolution by making required changes to the system.
• Validation of corrections.
Debugging Strategies:
1. Study the system for the larger duration in order to understand the system. It
helps debugger to construct different representations of systems to be
debugging depends on the need. Study of the system is also done actively to
find recent changes made to the software.
2. Backwards analysis of the problem which involves tracing the program
backward from the location of failure message in order to identify the region of
faulty code. A detailed study of the region is conducting to find the cause of
defects.
3. Forward analysis of the program involves tracing the program forwards using
breakpoints or print statements at different points in the program and studying
the results. The region where the wrong outputs are obtained is the region that
needs to be focused to find the defect.
4. Using the past experience of the software debug the software with similar
problems in nature. The success of this approach depends on the expertise of
the debugger.
Debugging Tools:
Debugging tool is a computer program that is used to test and debug other
programs. A lot of public domain software like gdb and dbx are available for
debugging. They offer console-based command line interfaces. Examples of
automated debugging tools include code based tracers, profilers, interpreters, etc.
Some of the widely used debuggers are:
• Radare2
• WinDbg
• Valgrind
Difference Between Debugging and Testing:
Debugging is different from testing. Testing focuses on finding bugs, errors, etc
whereas debugging starts after a bug has been identified in the software. Testing is
used to ensure that the program is correct and it was supposed to do with a certain
minimum success rate. Testing can be manual or automated. There are several
different types of testing like unit testing, integration testing, alpha and beta testing,
etc.
Debugging requires a lot of knowledge, skills, and expertise. It can be supported by
some automated tools available but is more of a manual process as every bug is
different and requires a different technique, unlike a pre-defined testing
mechanism.
White Box Testing method is applicable to the following levels of software testing:
• Unit Testing: For testing paths within a unit.
• Integration Testing: For testing paths between units.
• System Testing: For testing paths between subsystems.
Advantages
• Testing can be commenced at an earlier stage. One need not wait for the GUI
to be available.
• Testing is more thorough, with the possibility of covering most paths.
Disadvantages
•Since tests can be very complex, highly skilled resources are required, with a
thorough knowledge of programming and implementation.
• Test script maintenance can be a burden if the implementation changes too
frequently.
• Since this method of testing is closely tied to the application being tested, tools
to cater to every kind of implementation/platform may not be readily
available.
BLACK BOX TESTING
Black box test design technique: Procedure to derive and/or select test cases
based on an analysis of the specification, either functional or nonfunctional,
of a component or system without reference to its internal structure.
Example
A tester, without knowledge of the internal structures of a website, tests the web
pages by using a browser; providing inputs (clicks, keystrokes) and verifying the
outputs against the expected outcome.
Black Box Testing method is applicable to the following levels of software testing:
• Integration Testing
• System Testing
• Acceptance Testing
The higher the level, and hence the bigger and more complex the box, the more
black-box testing method comes into use.
Techniques
Following are some techniques that can be used for designing black box tests.
Advantages
• Tests are done from a user’s point of view and will help in exposing
discrepancies in the specifications.
• Tester need not know programming languages or how the software has been
implemented.
• Tests can be conducted by a body independent from the developers, allowing
for an objective perspective and the avoidance of developer-bias.
• Test cases can be designed as soon as the specifications are complete.
Disadvantages
• Only a small number of possible inputs can be tested and many program paths
will be left untested.
• Without clear specifications, which is the situation in many projects, test cases
will be difficult to design.
• Tests can be redundant if the software designer/developer has already run a
test case.
Unit Testing
Unit Testing is a software testing technique by means of which individual units of
software i.e. group of computer program modules, usage procedures and operating
procedures are tested to determine whether they are suitable for use or not. It is a
testing method using which every independent modules are tested to determine if
there are any issue by the developer himself. It is correlated with functional
correctness of the independent modules.
Unit Testing is defined as a type of software testing where individual components of
a software are tested.
Unit Testing of software product is carried out during the development of an
application. An individual component may be either an individual function or a
procedure. Unit Testing is typically performed by the developer.
In SDLC or V Model, Unit testing is first level of testing done before integration
testing. Unit testing is such type of testing technique that is usually performed by the
developers. Although due to reluctance of developers to tests, quality assurance
engineers also do unit testing.
Integration testing
The meaning of Integration testing is quite straightforward- Integrate/combine the unit
tested module one by one and test the behavior as a combined unit.
The main function or goal of this testing is to test the interfaces between the
units/modules.
We normally do Integration testing after “Unit testing”. Once all the individual units
are created and tested, we start combining those “Unit Tested” modules and start
doing the integrated testing.
The main function or goal of this testing is to test the interfaces between the
units/modules.
The individual modules are first tested in isolation. Once the modules are unit
tested, they are integrated one by one, till all the modules are integrated, to check
the combinational behavior, and validate whether the requirements are
implemented correctly or not.
Why Integration Test?
We feel that Integration testing is complex and requires some development and
logical skill. That’s true! Then what is the purpose of integrating this testing into our
testing strategy?
Some reasons:
1. In the real world, when applications are developed, it is broken down into
smaller modules and individual developers are assigned 1 module. The logic
implemented by one developer is quite different than another developer, so it
becomes important to check whether the logic implemented by a developer is
as per the expectations and rendering the correct value in accordance with the
prescribed standards.
2. Many a time the face or the structure of data changes when it travels from one
module to another. Some values are appended or removed, which causes
issues in the later modules.
3. Modules also interact with some third party tools or APIs which also need to
be tested that the data accepted by that API / tool is correct and that the
response generated is also as expected.
4. A very common problem in testing – Frequent requirement change! :) Many
a time developer deploys the changes without unit testing it. Integration
testing becomes important at that time.
Advantages :
• This testing makes sure that the integrated modules/components work
properly.
• Integration testing can be started once the modules to be tested are available.
It does not require the other module to be completed for testing to be done, as
Stubs and Drivers can be used for the same.
• It detects the errors related to the interface.
Challenges Listed below are few challenges that are involved in Integration Test.
1) Integration testing means testing two or more integrated systems in order to ensure
that the system works properly. Not only the integration links should be tested but
an exhaustive testing considering the environment should be done to ensure that the
integrated system works properly.
There might be different paths and permutations which can be applied to test the
integrated system.
2) Managing Integration testing becomes complex because of few factors involved
in it like the database, Platform, environment etc.
3) While integrating any new system with the legacy system, it requires a lot of
changes and testing efforts. Same applies while integrating any two legacy systems.
4)Integrating two different systems developed by two different companies is a big
challenge as for how one of the systems will impact the other system if any changes
are done in any one of the systems is not sure.
In order to minimize the impact while developing a system, few things should be
taken into consideration like possible integration with other systems, etc.
1. Bottom-up approach
2. Top-down approach.
Let’s consider the below figure to test the approaches:
Bottom-up approach:
Bottom-up testing, as the name suggests starts from the lowest or the innermost unit
of the application, and gradually moves up. The Integration testing starts from the
lowest module and gradually progresses towards the upper modules of the
application. This integration continues till all the modules are integrated and the
entire application is tested as a single unit.
In this case, modules B1C1, B1C2 & B2C1, B2C2 are the lowest module which is
unit tested. Module B1 & B2 are not yet developed. The functionality of Module B1
and B2 is that it calls the modules B1C1, B1C2 & B2C1, B2C2. Since B1 and
B2 are not yet developed, we would need some program or a “stimulator” which will
call the B1C1, B1C2 & B2C1, B2C2 modules. These stimulator programs are called
DRIVERS.
In simple words, DRIVERS are the dummy programs which are used to call the
functions of the lowest module in a case when the calling function does not exist.
The bottom-up technique requires module driver to feed test case input to the
interface of the module being tested.
The advantage of this approach is that, if a major fault exists at the lowest unit of the
program, it is easier to detect it, and corrective measures can be taken.
The disadvantage is that the main program actually does not exist until the last
module is integrated and tested. As a result, the higher level design flaws will be
detected only at the end.
Top-down approach:
This technique starts from the topmost module and gradually progress towards the
lower modules. Only the top module is unit tested in isolation. After this, the lower
modules are integrated one by one. The process is repeated until all the modules are
integrated and tested.
In the context of our figure, testing starts from Module A, and lower modules B1 and
B2 are integrated one by one. Now here the lower modules B1 and B2 are not
actually available for integration. So in order to test the topmost modules A, we
develop “STUBS”.
“Stubs” can be referred to as code a snippet which accepts the inputs/requests from
the top module and returns the results/ response. This way, in spite of the lower
modules, do not exist, we are able to test the top module.
In practical scenarios, the behavior of stubs is not that simple as it seems. In this era
of complex modules and architecture, the called module, most of the time involves
complex business logic like connecting to a database. As a result, creating Stubs
becomes as complex and time taking as the real module. In some cases, Stub module
may turn out to be bigger than the stimulated module.
Both Stubs and drivers are dummy piece of code which is used for testing the
“non- existing” modules. They trigger the functions/method and return the response,
which is compared to the expected behavior
Let’s conclude some difference between Stubs and Driver:
Stubs Driver
Top most module is tested first Lowest modules are tested first.
Stimulates the lower level of components Stimulates the higher level of components
Dummy program of lower level components Dummy program for Higher level component
The only change is Constant in this world, so we have another approach called
“Sandwich testing” which combines the features of both Top-down and bottomup
approach. When we test huge programs like Operating systems, we have to have
some more techniques which are efficient and boosts more confidence. Sandwich
testing plays a very important role here, where both, the Top down and bottom up
testing are started simultaneously.
Integration starts with the middle layer and moves simultaneously towards up and
down. In case of our figure, our testing will start from B1 and B2, where one arm
will test the upper module A and another arm will test the lower modules B1C1,
B1C2 & B2C1, B2C2.
Since both the approach starts simultaneously, this technique is a bit complex and
requires more people along with specific skill sets and thus adds to the cost.
GenNext software developed this product for me and below was the architecture:
UI – User Interface module, which is visible to the end user, where all the inputs are
given.
BL – Is the Business Logic module, which has all the all the calculations and
business specific methods.
VAL – Is the Validation module, which has all the validations of the correctness of
the input.
CNT – Is the content module which has all the static contents, specific to the inputs
entered by the user. These contents are displayed in the reports.
EN – Is the Engine module, this module reads all the data that comes from BL,
VAL and CNT module and extracts the SQL query and triggers it to the database.
Scheduler – Is a module which schedules all the reports based on the user
selection (monthly, quarterly, semiannually & annually) DB – Is the Database.
Now, having seen the architecture of the entire web application, as a single unit,
Integration testing, in this case, will focus on the flow of data between the modules.
So, it’s not specific that integration testing is a black box or white box technique.
Once all the modules are tested, system integration testing is done by integrating all
the modules and the system as a whole is tested.
System testing is a testing where the system as a whole is tested i.e. all the
modules/components are integrated together to verify whether the system works as
expected and no issues occur because of the integrated modules.
Test bed or test environment is configured as per the need of the Application Under
Test. On a few occasion, test bed could be the combination of the test environment
and the test data it operates.
• System Admins,
• Developers
• Testers
• Sometimes users or techies with an affinity for testing.
The test environment requires setting up of various number of distinct areas like,
Setup of Test Server
Every test may not be executed on a local machine. It may need establishing a test
server, which can support applications.
For example, Fedora set up for PHP, Java-based applications with or without mail
servers, cron set up, Java-based applications, etc.
Network
• Internet setup
• LAN Wifi setup
• Private network setup
It ensures that the congestion that occurs during testing doesn't affect other members.
(Developers, designers, content writers, etc.)
Test PC setup
For web testing, you may need to set up different browsers for different testers. For
desktop applications, you need various types of OS for different testers PCs.
Bug Reporting
Many companies use a separate test environment to test the software product. The
common approach used is to copy production data to test. This helps the tester, to
detect the same issues as a live production server, without corrupting the production
data.
The approach for copying production data to test data includes,
Testers or developers can copy this to their individual test environment. They can
modify it as per their requirement.
Privacy is the main issue in copy production data. To overcome privacy issues you
should look into obfuscated and anonymized test data.
• BlackList: In this approach, all the data fields are left unchanged. Except those
fields specified by the users.
• WhiteList: By default, this approach, anonymizes all data fields. Except for a
list of fields which are allowed to be copied. A whitelisted field implies that it
is okay to copy the data as it is and anonymization is not required.
Also, if you are using production data, you need to be smart about how to source
data. Querying the database using SQL script is an effective approach.
Test Environment Management deals with the maintenance and upkeep of the test bed.
Ineffective planning for resource usage can affect the actual output. Also, it
may lead to conflict between teams.
2. Remote environment
This type of testing usually done for 2 tier applications (usually developed for LAN).
Here we will be having Front-end and Backend.
The application launched on front-end will be having forms and reports which will
be monitoring and manipulating data
For Example, applications developed in VB, VC++, Core Java, C, C++, D2K,
PowerBuilder, etc., The backend for these applications would be MS Access, SQL
Server, Oracle, Sybase, Mysql, Quadbase
The tests performed on these types of applications would be
• User Interface Testing
• Manual Support Testing
• Functionality Testing
• Compatibility Testing & Configuration Testing
• Intersystem Testing
WEB TESTING :
This is done for 3 tier applications (developed for Internet / intranet / xtranet) Here
we will be having Browser, web server and DB server.
The applications accessible in the browser would be developed in HTML, DHTML,
XML, JavaScript, etc. (We can monitor through these applications)
Applications for the webserver would be developed in Java, ASP, JSP, VBScript,
JavaScript, Perl, Cold Fusion, PHP, etc. (All the manipulations are done on the
webserver with the help of these programs developed)
The DB server would be having Oracle, SQL Server, Sybase, MySQL, etc. (All data
is stored in the database available on the DB server)
The types of tests, which can be applied to this type of applications, are
• User Interface Testing for validation & user-friendliness
• Functionality Testing to validate behaviors, i/p, error handling, o/p,
manipulations, services levels, the order of functionality, links, content of web
page & backend coverage’s
• Security Testing
• Browser Compatibility
• Load/Stress Testing
• Interoperability Testing
• Storage & Data Volume Testing
A Client-Server Application is a Two-Tier Application
This has forms & reporting at front-end (monitoring & manipulations are done)
[using vb, vc++, core java, c, c++, d2k, power builder etc.,] -> database server at the
backend [data storage & retrieval) [using ms access, SQL Server, Oracle, Sybase,
MySQL, quad base etc.,]
The tests performed on these applications would be
• User Interface testing
• Manual Support Testing
• Functionality Testing
• Compatibility Testing
• Intersystem Testing
Some more points to clear the difference between Client-Server, Web and Desktop
applications:
Desktop Application:
• Application runs in single memory (Front end and Back end in one place)
• Single user only Client/Server Application:
• Application runs in two or more machines
• Application is a menu-driven
• Connected mode (connection exists always until logout)
• A limited number of users
• Less number of network issues when compared to the web app.
Web Application:
• Application runs in two or more machines
• URL-driven
• Disconnected mode (stateless)
• Unlimited number of users
• Many issues like Hardware Compatibility, Browser Compatibility, Version
Compatibility, Security Issues, performance issues, etc.
As per difference in both, the applications come where, how to access the resources.
In Client-Server, once the connection is made it will be in the state on connected,
whereas in case of web testing HTTP protocol is stateless, then there comes logic of
cookies, which is not in Client-Server.
For Client-Server application users are well known, whereas for web application any
user can log in and access the content, he/she will use it as per his intentions.
TESTING DOCUMENTATION
Documentation as part of process
Testing documentation is usually associated with the documentation of artifacts that
should be developed before or during the testing of software.
• Test Plan.
• Test Case.
• Test Scenario.
Test plan outlines the common strategy that will be applied to test an application.
• Traceability [Link] PlanA Test plan outlines the common strategy that will be applied to test an
application, the resources that will be used, the test environment in which testing will be performed, and the
schedule of testing activities along with the limitations. Typically writing a Test Plan is the competence of the
Quality Assurance Team Lead.
A test plan includes the following:
• Introduction to the Test Plan document.
• Assumptions while testing the application.
• Approaches to be used while testing the software/application.
• List of test cases used during the testing process.
• Enumeration of features to be tested.
• List of deliverables to be tested.
• The resources allocated for testing the application.
• A schedule of tasks and milestones to be reached.
• Possible risks involved during the testing process.
Test Case
Test case is a complexity of inputs, serious of steps, and conditions that can be used
during the process of testing. The key point of this activity is to find out whether a
software is successful in terms of its functionality and other aspects. There are
various types of test cases such as logical, functional, error, negative test cases,
physical test cases, UI test cases, etc.
What's more, test cases are written to keep track of the software testing coverage.
Basically, there are no formal templates that can be used while writing a test case.
Test case is a complexity of inputs, serious of steps, and conditions that can be used
during the process of testing.
The following components are commonly accepted:
A single test scenario can be applied to many test cases. In addition, sometimes
numerous test cases are written for a single software which are collectively known
as test suites.
Test Step – is the smallest unit of testing. This is the minimum action which is done
by a tester during testing. As an example, a good test scenario is the wish to brush
your teeth. Rather simple and clear wish, I may say. The test case can be performed
by the process of squeezing a toothpaste from the tube. This process can easily be
divided into smaller steps, such as: taking the tube, unscrewing the cap, pressing it
until there is enough toothpaste etc.
Test Step – is the smallest unit of testing.
Test Scenario
Test Scenario - it is a one line statement which purpose is to inform what particular
area in the application will be tested. Test scenarios are used to ensure that all process
flows are thoroughly tested. For a particular area of an application a single test
scenario may be enough, and for others the number may go up to a few hundred
scenarios depending on the significance and complexity of the application.
Test scenarios are used to ensure that all process flows are thoroughly tested.
The terms 'test scenario' and 'test cases' are sometimes used interchangeably,
however a test scenario usually consists of several steps, whereas a test case has a
single step. Taking this into account, test scenarios are test cases, but they include
several test cases and the sequence that they should be executed. Moreover, each test
relies on the output from the previous test.
Traceability Matrix
Traceability Matrix is a table that is used to trace the requirements during the
Software Development Life Cycle.
Each requirement in the RTM document is linked with its associated test case so that
testing can be done as per the mentioned requirements. Moreover, Bug ID is also
included and linked with its associated requirements and test case.
The main goals for this matrix are:
• Verification that the software is developed as per the mentioned requirements.
• Identification the root cause of any bug.
• Tracing the developed documents during different phases of SDLC.
In the field of software testing, real time testing refers to the process of testing the
real time software product or system i.e. the system is constrained by some specific
time limits to perform and complete the job. Air Traffic Control and space navigation
system, may be seen as the examples of real time system, i.e. they responses in real
time.
First of all, real time systems are associated with the time-constraints as such testing
the system endorsed with the deadlines and real-time responses may seems to be a
tedious & complex job. Moreover, the results being generated by the real time
systems are non –predictable and have non-deterministic outcomes as such
conventional methods may not prove to be effective to test the real time systems.
Further, analyzing and testing the real time systems may be carried out in various
ways as such it would not recommendable to rely on one strategy or approach, i.e. it
would need exhaustive type of testing to evaluate the real time system and thereby,
may prove to be a time-consuming and expensive process.
How to do it?
Real time testing technique follow a simple and basic strategy to execute the testing
task, as described below:
• Task Testing
• Behavioral Testing
The simulated real environment is being created based on the design model
with the help of automated tools to study the behaviour of the system under
the impact of external forces.
• Intertask Testing
After getting through the task of revealing errors in code and behavorial aspect
of the system, time-constraints are being introduced through intertask testing.
• System Testing
•
Verification Validation
Verification is the process to find whether the software The validation process is checked whether the
meets the specified requirements for particular phase. software meets requirements and expectation of
the customer.
It estimates an intermediate product. It estimates the final product.
The objectives of verification is to check whether The objectives of the validation is to check
software is constructed according to requirement and whether the specifications are correct and satisfy
design specification. the business need.
It describes whether the outputs are as per the inputs or It explains whether they are accepted by the user or
not. not.
Verification is done before the validation. It is done after the verification.
Plans, requirement, specification, code are evaluated Actual product or software is tested under
during the verifications. validation.
It manually checks the files and document. It is a computer software or developed program
based checking of files and document.
Unit testing
Unit testing starts at the centre and each unit is implemented in source code.
Integration testing
An integration testing focuses on the construction and design of the software.
Validation testing
Check all the requirements like functional, behavioral and performance requirement
are validate against the construction software.
System testing
System testing confirms all system elements and performance are tested entirely.
As per the procedural point of view the testing includes following steps.
1) Unit testing
2) Integration testing
3) High-order tests
4) Validation testing
1) UNIT TESTING :
• Unit testing focus on the smallest unit of software design, i.e module or software
component.
• Test strategy conducted on each module interface to access the flow of input and
output.
• The local data structure is accessible to verify integrity during execution.
• Boundary conditions are tested.
• In which all error handling paths are tested.
• An Independent path is tested.
Following figure shows the unit testing:
Stub does not accept test case data. Driver accepts test case data.
It replace the modules of the program into subprograms and Pass the data to the tested components and
are tested by the next driver. print the returned result.
2) INTEGRATION TESTING
a. Top-down integration
b. Bottom-up integration
1. TOP-DOWN INTEGRATION
[Link]-UP INTEGRATION
In bottom up integration testing the components are combined from the lowest level
in the program structure.
3) REGRESSION TESTING
• In regression testing the software architecture changes every time when a new
module is added as part of integration testing.
4) SMOKE TESTING
• The developed software component are translated into code and merge to complete
the product.
Regression testing is used to check defects generated to At the time of developing a software product
other modules by making the changes in existing smoke testing is used.
programs.
In regression tested components are tested again to verify It permit the software development team to test
the errors. projects on a regular basis.
Regression testing needs extra manpower because the cost Smoke testing does not need an extra manpower
of the project increases. because it does not affect the cost of project.
Testers conduct the regression testing. Developer conducts smoke testing just before
releasing the product.
ALPHA AND BETA TESTING
Alpha testing Beta testing
Alpha testing is executed at developers end by the Beta testing is executed at end-user sites in the
customer. absence of a developer.
It handles the software project and applications. It usually handles software product.
It is not open to market and the public. It is always open to the market and the public.
Alpha testing does not have any different name. Beta testing is also known as the field testing.
Alpha testing is not able to test the errors because the In beta testing, the developer corrects the errors
developer does not known the type of user. as users report the problems.
In alpha testing, developer modifies the codes before In beta testing, developer modifies the code after
release the software without user feedback. getting the feedback from user.
Definition
During the process of manufacturing a ballpoint pen, the cap, the body, the tail, the
ink cartridge and the ballpoint are produced separately and unit tested separately.
When two or more units are ready, they are assembled and Integration Testing is
performed. When the complete pen is integrated, System Testing is performed.
Method
Usually, Black Box Testing method is used.
When is it performed?
Load Testing
Load Testing is a type of performance test where the application is tested for its
performance on normal and peak usage. The performance of an application is
checked with respect to its response to the user request and its ability to respond
consistently within an accepted tolerance on different user loads.
Generally, Stress Testing has an incremental approach where the load is increased
gradually. The test is started with a load for which the application has already been
tested. Then, more load is added slowly to stress the system. The point at which we
start seeing servers not responding to the requests is considered the breaking point.
Capacity Testing
=> Is the application capable of meeting business volume under both normal and
peak load conditions?
Capacity Testing is generally done for future prospects. Capacity Testing addresses
the following:
1. Will the application be able to support the future load?
2. Is the environment capable of standing for the upcoming increased load?
3. What are the additional resources required to make the environment capable
enough?
Capacity Testing is used to determine how many users and/or transactions a given
web application will support and still meet performance. During this testing,
resources such as processor capacity, network bandwidth, memory usage, disk
capacity, etc. are considered and altered to meet the goal.
Online Banking is a perfect example of where capacity testing could play a major
role.
Reliability/Recovery Testing
If an online trading site experiences a failure where the users are not able to buy/sell
shares at a certain point of the day (peak hours) but are able to do so after an hour or
two, we can say the application is reliable or recovered from the abnormal behavior.
1) Requirement Analysis/Gathering
The performance team interacts with the client for identification and gathering of
requirements – technical and business. This includes getting information on the
application's architecture, technologies, and database used, intended users,
functionality, application usage, test requirement, hardware & software
requirements, etc.
2) POC/Tool selection
Once the key functionality is identified, POC (Proof Of Concept – which is a sort of
demonstration of the real-time activity but in a limited sense) is done with the
available tools.
The list of available tools depends on the cost of the tool, protocol that application
is using, the technologies used to build the application, the number of users we are
simulating for the test, etc. During POC, scripts are created for the identified key
functionality and executed with 10-15 virtual users.
Test Planning involves information on how the performance test is going to take
place – test environment, workload, hardware, etc.
Some of the best practices that help the Result Analysis process:
1. A unique and meaningful name to every test result – this helps in
understanding the purpose of the test.
2. Include the following information in the test result summary:
• Reason for the failure/s
• Change in the performance of the application compared to the previous test
run
• Changes made in the test from the point of application build or test
environment.
• It’s a good practice to make a result summary after each test run so that
analysis results are not compiled every time test results are referred.
• PT generally requires many test runs to reach the correct conclusion.
• It is good to have the following points in result summary:
• Purpose of test
• Number of virtual users
• Scenario summary
• Duration of test
• Throughput
• Graphs
• Graphs comparison
• Response Time
• Error occurred
• Recommendations
8) Report
Test results should be simplified so the conclusion is clearer and should not need
any derivation. Development Team needs more information on analysis,
comparison of results, and details of how the results were obtained.
The test report is considered to be good if it is brief, descriptive and to the point.
How To Write Performance Test Strategy Document?
The key objectives of Performance Testing are as follows:
• To gain the confidence that the changes to the existing chat application are in
line with the defined Service Level Agreement.
• To ensure that the application performance, service availability, and the
stability of the application are not impacted as a result of the new
enhancements.
• Transaction Response Times remain within the acceptable tolerance over the
increasing Load profile.
• JVMs show stable memory usage over the increasing load profiles.
The below picture clearly explains Performance Testing & Optimization process:
Performance Test Scenarios
Include the excel with the set of scenarios.
For Example,
Scenario 1: To validate the Agent and customer chat for X no. of concurrent
sessions.
Performance Test Types
The table given below explains the various types of Performance Tests along with
their objectives.
Test Type Objective
Baseline Test Establish the best performance under specific volumes which will be used as a reference
for subsequent measurements.
Load Test Measure the system performance under anticipated peak production load.
Endurance Measuring the system stability under high volume for an extended period.
Test
Stress Test Measure the system performance under unfavorable conditions.
Performance Metrics
• Client-side Metrics
1 Transaction onse Time Response time of pages during the steady state of the Graph
performance test
2 Throughput The amount of data that the VUsers received from the Graph
server over time
5 Transaction Error Rate The Percentage of transactions that failed during the Graph test execution
System & Network Performance Metrics
2) Test Data
It is being assumed that the Performance environment data will be a copy of the
production data and the required test data will be provided by the project team.
Regression Testing is the process of testing the modified parts of the code and the
parts that might get affected due to the modifications to ensure that no new errors
have been introduced in the software after the modifications have been made.
Regression means return of something and in the software field, it refers to the return
of a bug.
When to do regression testing?
• When a new functionality is added to the system and the code has been modified
to absorb and integrate that functionality with the existing code.
• When some defect has been identified in the software and the code is debugged
to fix it.
• When the code is modified to optimize its working.
Process of Regression testing:
Firstly, whenever we make some changes to the source code for any reasons like
adding new functionality, optimization, etc. then our program when executed fails in
the previously designed test suite for obvious reasons. After the failure, the source
code is debugged in order to identify the bugs in the program. After identification of
the bugs in the source code, appropriate modifications are made. Then appropriate
test cases are selected from the already existing test suite which covers all the
modified and affected parts of the source code. We can add new test cases if required.
In the end regression testing is performed using the selected test cases.
TECHNIQUES FOR THE SELECTION OF TEST CASES FOR
REGRESSION TESTING:
• Select all test cases: In this technique, all the test cases are
selected from the already existing test suite. It is the most
simple and safest technique but not much efficient.
• Select test cases randomly: In this technique, test cases are
selected randomly from the existing test-suite but it is only
useful if all the test cases are equally good in their fault
detection capability which is very rare. Hence, it is not used in
most of the cases.
• Select modification traversing test cases: In this technique,
only those test cases are selected which covers and tests the
modified portions of the source code the parts which are
affected by these modifications.
• Select higher priority test cases: In this technique, priority
codes are assigned to each test case of the test suite based upon
their bug detection capability, customer requirements, etc. After
assigning the priority codes, test cases with highest priorities are
selected for the process of regression testing. Test case with
highest priority has highest rank. For example, test case with
priority code 2 is less important than test case with priority code
1.
While testing the boundary value analysis the main aim of the software tester is
to check whether the application is providing the correct input or not when
entering the boundary values.
While writing the test cases for boundary value tester has to identify the range
boundary value and then start writing test cases.
Example - Test Cases :
Check the age field by entering the value which is not in the range (ie.17and 36)
Check the age field by entering the exact boundary value (ie . 18and 35 )
Check the age field by entering the value which is within the boundary value (17
to 34)
Boundary Value Analysis is based on testing the boundary values of valid and
invalid partitions. The behaviour at the edge of the equivalence partition is more
likely to be incorrect than the behaviour within the partition, so boundaries are an
area where testing is likely to yield defects.
It checks for the input values near the boundary that have a higher chance of
error. Every partition has its maximum and minimum values and these maximum
and minimum values are the boundary values of a partition.
Note:
Minimum value.
Value.
value.
Valid Test cases: Valid test cases for the above can be any value entered greater
than 17 and less than 57.
Invalid Testcases: When any value less than 18 and greater than 56 is entered.
1 ≤ Month≤12 1
≤ Day ≤31
1900 ≤ Year ≤ 2000
Taking Day as Single Fault Assumption i.e. Day will be having values varying
from 1 to 31 and others will have nominal values.
Taking Month as Single Fault Assumption i.e. Month will be having values
varying from 1 to 12 and others will have nominal values.
4 × 3 + 1 =13
The focus of BVA: BVA focuses on the input variable of the function. Let’s
define two variables X1 and X2, where X1 lies between a and b and X2 lies
between c and d.
PASCAL, ADA is the strongly typed language that requires all constants or
variables defined with an associated data type.
ROBUSTNESS TESTING
********************************************************
What is Robustness Testing?
Robustness testing, also known as fault tolerance testing or negative testing, is a
software testing technique designed to assess a system’s ability to handle
unexpected or invalid inputs gracefully. It aims to identify vulnerabilities and
weaknesses in the software that could lead to crashes, security breaches, or data
corruption when faced with unpredictable circumstances. Robustness testing
goes beyond normal functionality testing and pushes the software to its limits.
**************************************************************
******************************************************************
******************************************************************
Load Testing: While typically associated with performance testing, load testing
can also be used for robustness testing by simulating heavy loads to assess how
the software responds to stress.
CHALLENGES IN ROBUSTNESS TESTING:
Test Case Generation: Creating comprehensive test cases for robustness testing
can be challenging, as it requires identifying potential weaknesses in the
software.
Resource Intensive: This testing, especially stress testing, can be resource-
intensive and time-consuming, requiring powerful hardware and thorough
monitoring.
False Positives: This testing may generate false positives, where the software
may handle invalid inputs correctly, but the test reports indicate issues
Diverse Inputs: Ensure that your test inputs are diverse and cover a wide range of
potential scenarios, including edge cases and error conditions.
Cost Savings: Identifying and fixing issues during the development phase
through robustness testing is considerably more cost-effective than addressing
them after the software has been deployed. This testing can help avoid costly
downtime, data breaches, and legal repercussions.
Optimized Performance: This testing, particularly stress testing, assesses how the
software handles heavy loads and resource exhaustion. This information is
valuable for optimizing the software’s performance and scalability.
Early Issue Identification: This testing is often conducted early in the software
development lifecycle. This allows developers to identify and address issues
before they propagate through the entire system, saving time and effort.
Preventative Maintenance: This testing promotes a proactive approach to
software quality assurance. By anticipating potential issues, organizations can
take preventive measures to ensure software robustness.
Risk Mitigation: Identifying and addressing robustness issues reduces the risk of
software failures and their associated consequences, including reputation
damage, financial losses, and customer churn.
Include detailed information on how each parameter was evaluated and why
specific conditions were chosen.
6) Worst-Case: Monitoring and Adaptation
Emphasize the need for ongoing monitoring and reassessment of worst-case
scenarios (e.g., product and/or process changes; is the worst-case still
applicable?).Acknowledge that technology, regulations, or other circumstances
may change, requiring updates to worst-case definitions.
TEST CASE
*****************************************************************
A test case specifies the inputs, execution conditions, testing procedure, and
expected results that define a single test to achieve a particular software testing
objective, such as to exercise a particular program path or verify compliance
with a specific requirement.
Test cases are software or application pieces that you can use to test the
functionality of a real system. They can be used to evaluate the correctness and
completeness of your code and can be used in conjunction with unit testing tools
to ensure the quality of your applications.
Test cases can be created manually or using software testing tools. They are an
essential part of software development and should be used wherever possible to
ensure the quality and functionality of your applications, including end-user test
execution.
How To Write Test Cases In Software Testing :
Writing test cases is an essential part of software testing. Without them, it would
not be easy to verify the results of your tests. Test cases are templates that help
automate the testing process. They help specify the conditions under which a
particular functionality should be tested, including the postcondition.
For example, a test case could include clicking the login button and verifying
that the user is directed to the correct page.
Creating test cases ensures your software functions as expected and performs
properly in all situations, including login functionality where the user enters
their username and password. Additionally, TCs are necessary for manual
testing – without them, it would be difficult to verify the results of your tests.
Best Practice for Writing Good Test Case For Tester
Writing good pre-test cases is essential for testing the functionality and usability
of your software or application. If you follow best practices for software
requirements, your TCs will be easy to follow and understand, and you’ll be able
to run them frequently to ensure they’re accurate.
Include all the necessary details in your test cases to test the software under all
possible conditions. Finally, ensure your test cases are easy to follow and run so
that everyone involved in testing can get the most out of them. You can also
provide a tutorial to help users understand how to run the test cases effectively.
Now, we will see how to create a basic test case format. First, we will create the
test case template and then implement the test cases as required. So, to create a
test case template, I will open an Excel sheet and add the required fields,
including documentation.
So before start writing the test case template, let’s see what fields are necessary
in a TCs template while writing test cases. Here is the fields list:
1. Project Name
2. Created By
3. Reviewed By
4. Test Scenario ID
5. Test Case ID
6. Test Steps
7. Post Conditions
8. Actual Result
9. Executed By
10. Comments ( if any )
11. Module Name
12. Creation Date
13. Reviewed Date
14. Test Scenario Description
15. Test Case Description
16. Preconditions
17. Expected Result
18. Status
19. Executed Date
Manual Testing Test Cases QA
We noticed that the interviewer mostly gave some real-time scenarios and
expected test cases. If you have good knowledge of that application, you need to
think as much as possible about test scenarios. If you are unaware of that
application, you can ask for the details of the application, which is called
Business Rules and Acceptance Criteria.
Different Types of Test Case Scenarios
Test cases are a set of specific instructions or criteria that are used to determine
whether a piece of code is working correctly. These test cases can be designed to
test different aspects of the code, such as its functionality, performance, or
security. In some cases, test cases may be designed to intentionally cause the
code to fail, for example, by providing incorrect input or attempting to access
restricted areas.
This is done to verify that the code can handle such situations and respond
appropriately rather than crashing or behaving unexpectedly. So, based on the
behaviors, we can divide the test cases into the following:
Test Cases Examples ~ Test Cases Scenario Example
We Know if someone started his/her career as a manual tester, then the first
assigned work for him may be writing test cases. In that time, you may be
looking for Test Cases in Software Testing Examples PDF, which will help you
to understand how to write test cases.
We will provide the manual testing projects with test cases in a PDF. So, if you
have been searching for Test Cases in the Software Testing Examples PDF, we
will gladly share the test cases below.
The manual testing projects below with test cases pdf can be used for software
testing, performance testing, and penetration testing. The test case example for
manual testing provided in the PDF is only an example to give you a better idea
of how these tools work best in the software development environment
(development/testing).
Functional Test Case Examples
A functional test case is a valuable tool for testers that helps ensure that a new
function or feature works as expected. Creating and running a functional test case
lets you quickly determine if the function or feature works as intended. This
process helps prevent any unexpected side effects during the release process,
which could lead to chaos and instability.
*****************************************************************
Check that the figure must contain only three sides, straight, and only three
angles.
if it is equilateral and if all the angles are equal (i.e., 60 degrees]. Check if the
user can draw the three circles [interior, exterior, circumcircle ] Check
A triangle can not have two right angles, i.e., it can not have two angles equal to
90o as it is equal to 180o for two angles, and the third angle must be zero, which
is impossible.
A triangle can not have two obtuse angles, and a triangle can not have two angles
more than 90o as it only exceeds 180o for two angles.
Verify if the cup can sustain hot tea for at least 1 hour.
Verify if the cup can sustain cold tea for at least 1 hour. Verify
Check the shape of the base for stability with and without tea. Negative
Verify any leakage for the coffee cup or tea cup. Verify
These Test cases for Tea Cup testing techniques cover a comprehensive range of
factors, ensuring a thorough assessment of the coffee or tea cups in terms of their
design and functionality.
Conclusion:
Developing thorough Test Case For Tea Cups, coffee, and all-purpose cups is crucial for
identifying design flaws before manufacturing. As we have seen, testcases should
evaluate factors like temperature sustainability, spill and leak prevention, durability,
capacity, grip, usability, and compliance with relevant standards.
1. What is testing ?
2. What is software testing?
3. Why do we need testing in project ?
4. What are the stages involved in testing?
5. What are the types of testing?
6. Difference between black box testing and white box testing.
7. Explain the types of testing in detail.(11 marks)
8. What is a test case?
9. Why do we need a test case in testing?
[Link] are the principles used in testing that are applied for all the test case?
[Link] are the four important test cases used in testing ?
[Link] the guidelines of BVA in all the 4 test case. (11marks)
[Link] and disadvantages of BVA.
[Link] a short note on robust testing , worst case testing , special value testing (11marks)
[Link] in detail about the four test cases .(11marks)