downloadfile
downloadfile
3. Early Testing
Here early testing means that all the testing activities should start in the early stages of the software development
life cycle's requirement analysis stage to identify the defects because if we find the bugs at an early stage, it will
be fixed in the initial stage itself, which may cost us very less as compared to those which are identified in the
future phase of the testing process.
To perform testing, we will require the requirement specification documents; therefore, if the requirements are
defined incorrectly, then it can be fixed directly rather than fixing them in another stage, which could be the
development phase.
4. Defect clustering
The defect clustering defined that throughout the testing process, we can detect the numbers of bugs which are
correlated to a small number of modules. We have various reasons for this, such as the modules could be
complicated; the coding part may be complex, and so on.
5. Pesticide paradox
This principle defined that if we are executing the same set of test cases again and again over a particular time,
then these kinds of the test will not be able to find the new bugs in the software or the application. To get over
these pesticide paradoxes, it is very significant to review all the test cases frequently. And the new and different
tests are necessary to be written for the implementation of multiple parts of the application or the software, which
helps us to find more bugs
6. Testing is context-dependent
Testing is a context-dependent principle states that we have multiple fields such as e-commerce websites,
commercial websites, and so on are available in the market. There is a definite way to test the commercial site
as well as the e-commerce websites because every application has its own needs, features, and functionality. To
check this type of application, we will take the help of various kinds of testing, different technique, approaches,
and multiple methods. Therefore, the testing depends on the context of the application.
•Quality product
•Offers confidence
•Enhances growth
Type of Software testing
We have various types of testing available in the market, which are used to test the application or the software.
With the help of below image, we can easily understand the type of software testing:
Software Testing Types
Manual Automatic
Functional Non-Functional
Load Testing
Unit Testing Top Down Compatibility Testing Stress Testing
Integration
Bottom UP Performance Testing Scalability
System Testing Testing
User Acceptance Testing Usability Testing
Stability Testing
Manual testing
The process of checking the functionality of an application as per the customer needs without taking any help of
automation tools is known as manual testing. While performing the manual testing on any application, we do
not need any specific knowledge of any testing tool, rather than have a proper understanding of the product so
we can easily prepare the test document.
Manual testing can be further divided into three types of testing, which are as follows:
• White box testing
• Black box testing
• Gray box testing
In other words, we can say that the developer will execute the complete white-box testing for the particular
software and send the specific application to the testing team.
The purpose of implementing the white box testing is to emphasize the flow of inputs and outputs over the software
and enhance the security of an application.
Input
Output
White box testing is also known as open box testing, glass box testing, structural testing, clear box testing, and
transparent box testing.
Black Box Testing
Another type of manual testing is black-box testing. In this testing, the test engineer will analyze the software
against requirements, identify the defects or bug, and sends it back to the development team.
• Then, the developers will fix those defects, do one round of White box testing, and send it to the testing team.
• Here, fixing the bugs means the defect is resolved, and the particular feature is working according to the given
requirement.
• The main objective of implementing the black box testing is to specify the business needs or the customer's
requirements.
• In other words, we can say that black box testing is a process of checking the functionality of an application as
per the customer requirement. The source code is not visible in this testing; that's why it is known as black-
box testing.
Functional Testing
The test engineer will check all the components systematically against requirement specifications, is known
as functional testing. Functional testing is also known as Component testing.
In functional testing, all the components are tested by giving the value, defining the output, and validating the actual
output with the expected value.
Functional testing is a part of black-box testing as it emphases on application requirement rather than actual
code. The test engineer has to test only the program instead of the system.
2. Integration Testing
Once we are successfully implementing the unit testing, we will go integration testing. It is the second level
of functional testing, where we test the data flow between dependent modules or interface between two
features is called integration testing.
The purpose of executing the integration testing is to test the statement's accuracy between each module.
Types of Integration Testing:
Integration testing is also further divided into the following parts:
•Incremental Testing
•Non-Incremental Testing
Incremental Integration Testing
Whenever there is a clear relationship between modules, we go for
incremental integration testing. Suppose, we take two modules and
analysis the data flow between them if they are working fine or
not.
If these modules are working fine, then we can add one more
module and test again. And we can continue with the same process
to get better results.
In other words, we can say that incrementally adding up the
modules and test the data flow between the modules is known
as Incremental integration testing.
3. System Testing
Whenever we are done with the unit and integration testing, we can proceed with the system testing.
In system testing, the test environment is parallel to the production environment.
It is also known as end-to-end testing.
In this type of testing, we will undergo each attribute of the software and test if the end feature works
according to the business requirement. And analysis the software product as a complete system.
Acceptance Testing
When the software is ready to hand over to the customer it has to go through last phase of testing where it is tested
for user-interaction and response. This is important because even if the software matches all user requirements and
if user does not like the way it appears or works, it may be rejected.
•Alpha testing - The team of developer themselves perform alpha testing by using the system as if it is being
used in work environment. They try to find out how user would react to some action in software and how the
system should respond to inputs.
• Alpha Testing is a type of acceptance testing; performed to identify all possible issues and bugs before releasing
the final product to the end users. Alpha testing is carried out by the testers who are internal employees of the
organization. The main goal is to identify the tasks that a typical user might perform and test them.
• To put it as simple as possible, this kind of testing is called alpha only because it is done early on, near the end of
the development of the software, and before beta testing. The main focus of alpha testing is to simulate real users by
using a black box and white box techniques.
•Beta testing - After the software is tested internally, it is handed over to the users to use it under their production
environment only for testing purpose. This is not as yet the delivered product. Developers expect that users at this
stage will bring minute problems, which were skipped to attend.
Beta Testing is performed by "real users" of the software application in "real environment" and it can be
considered as a form of external User Acceptance Testing. It is the final test before shipping a product to the
customers. Direct feedback from customers is a major advantage of Beta Testing. This testing helps to test
products in customer's environment.
Beta version of the software is released to a limited number of end-users of the product to obtain feedback on the
product quality. Beta testing reduces product failure risks and provides increased quality of the product through
customer validation.
There are different types of Beta tests in software testing, and they are as follows:
Traditional Beta testing: Product is distributed to the target market, and related data is gathered in all
aspects. This data can be used for Product improvement.
Public Beta Testing: Product is publicly released to the outside world via online channels and data can be
gathered from anyone. Based on feedback, product improvements can be done. For example, Microsoft
conducted the largest of all Beta Tests for its OS -- Windows 8 before officially releasing it.
Technical Beta Testing: Product is released to the internal group of an organization and gathers
feedback/data from the employees of the organization.
Focused Beta: Product is released to the market for gathering feedback on specific features of the program.
For example, important functionality of the software.
Post-release Beta: Product is released to the market and data is gathered to make improvements for the future
release of the product.
Phases of Testing
Release
Pre-Alpha Alpha Beta Candidate Release
(RC)
Pre-Alpha:- Software is a prototype. UI is complete. But not all features are completed. At this stage, software
is not published.
Alpha: Software is near its development and is internally tested for bugs/issues
Beta: Software is stable and is released to a limited user base. The goal is to get customer feedback on the
product and make changes in software accordingly
Release Candidate (RC): Based on the feedback of Beta Test, you make changes to the software and want to
test out the bug fixes. At this stage, you do not want to make radical changes in functionality but just check for
bugs. RC is also put out to the public
Release: All works, software is released to the public.
Advantages of Alpha Testing: Disadvantages of Alpha Testing:
• Provides better view about the reliability of the •In depth, functionality cannot be tested as software is
software at an early stage still under development stage Sometimes developers and
• Helps simulate real time user behaviour and testers are dissatisfied with the results of alpha testing
environment.
• Detect many showstopper or serious errors
• Ability to provide early detection of errors with
respect to design and functionality
2. Alpha testing performed at the developer's site; it always needs a Beta testing doesn't need any lab environment or the testing environment; it is
testing environment or lab environment. performed at a client's location or end-user of the product.
3. Reliability or security testing not performed in-depth in alpha Reliability, security, and robustness checked during beta testing.
testing.
4. Alpha testing involves both white box and black-box techniques. Beta testing uses only black-box testing.
5. Long execution cycles maybe require for alpha testing. Only a few weeks are required for the execution of beta testing.
6. Critical issues or fixes can be identified by developers immediately Most of the issues or feedback is collecting from the beta testing will be implemented for
in alpha testing. the future versions of the product.
7. Alpha testing performed before the launch of the product into the At the time of software product marketing.
market.
8. Alpha testing focuses on the product's quality before going to Beta testing concentrates on the quality of the product, but gathers users input on the
beta testing. product and ensures that the product is ready for real-time users.
9. Alpha testing performed nearly the end of the software Beta testing is a final test before shipping a product to the customers.
development.
10. Alpha testing is conducting in the presence of developers and the Beta testing reversed of alpha testing.
absence of end-users.
Non-function Testing
The next part of black-box testing is non-functional testing. It provides detailed information on software product
performance and used technologies.
Non-functional testing will help us minimize the risk of production and related costs of the software.
Non-functional testing is a combination of performance, load, stress, usability and, compatibility testing.
Types of Non-functional Testing
Non-functional testing categorized into different parts of testing, which we are going to discuss further:
• Performance Testing
• Usability Testing
• Compatibility Testing
1. Performance Testing
In performance testing, the test engineer will test the working of an application by applying some load.
In this type of non-functional testing, the test engineer will only focus on several aspects, such as Response time,
Load, scalability, and Stability of the software or an application.
Classification of Performance Testing
Performance testing includes the various types of testing, which are as follows:
• Load Testing
• Stress Testing
• Scalability Testing
• Load Testing
• Stability Testing
While executing the performance testing, we will
apply some load on the particular application to
Classification of Performance Testing check the application's performance, known
as load testing. Here, the load could be less than or
equal to the desired load.
It will help us to detect the highest operating
volume of the software and bottlenecks.
• Stress Testing
It is used to analyze the user-friendliness and robustness of the software beyond the common functional limits.
Primarily, stress testing is used for critical software, but it can also be used for all types of software applications.
• Scalability Testing
To analysis, the application's performance by enhancing or reducing the load in particular balances is known
as scalability testing.
In scalability testing, we can also check the system, processes, or database's ability to meet an upward need. And
in this, the Test Cases are designed and implemented efficiently.
• Stability Testing
Stability testing is a procedure where we evaluate the application's performance by applying the load for a precise
time.
It mainly checks the consistancy problems of the application and the efficiency of a developed product. In this
type of testing, we can rapidly find the system's defect even in a stressful situation.
2. Usability Testing
Another type of non-functional testing is usability testing. In usability testing, we will analyze the user-
friendliness of an application and detect the bugs in the software's end-user interface.
Here, the term user-friendliness defines the following aspects of an application:
• The application should be easy to understand, which means that all the features must be visible to end-users.
• The application's look and feel should be good that means the application should be pleasant looking and make
a feel to the end-user to use it.
3. Compatibility Testing
In compatibility testing, we will check the functionality of an application in specific hardware and software
environments. Once the application is functionally stable then only, we go for compatibility testing.
Here, software means we can test the application on the different operating systems and other browsers,
and hardware means we can test the application on different sizes.
3. Grey Box Testing
Another part of manual testing is Grey box testing. It is a collaboration of black box and white box testing.
Since, the grey box testing includes access to internal coding for designing test cases. Grey box testing is
performed by a person who knows coding as well as testing.
Black
Box
+ White = Grey Box
Testing
Box
In other words, we can say that if a single-person team done both white box and black-box testing, it is
considered grey box testing.
Black Box Testing vs. White Box Testing vs. Grey Box
Testing
Index Black Box Testing White Box Testing Grey Box Testing
1 Knowledge of internal working structure (Code) is Knowledge of internal working structure (Coding Partially Knowledge of the internal
not required for this type of testing. Only GUI of software) is necessarily required for this type of working structure is required.
(Graphical User Interface) is required for test testing.
cases.
2 Black Box Testing is also known as functional White Box Testing is also known as structural Grey Box Testing is also known as
testing, data-driven testing, and closed box testing, clear box testing, code-based testing, and translucent testing as the tester has
testing. transparent testing. limited knowledge of coding.
3 The approach towards testing includes trial White Box Testing is proceeded by verifying the If the tester has knowledge of
techniques and error guessing method because system boundaries and data domains inherent in coding, then it is proceeded by
tester does not need knowledge of internal the software as there is no lack of internal coding validating data domains and internal
coding of the software. knowledge. system boundaries of the software.
4 The testing space of tables for inputs (inputs to be The testing space of tables for inputs (inputs to be The testing space of tables for
used for creating test cases) is pretty huge and used for creating test cases) is less as compared to inputs (inputs to be used for
largest among all testing spaces. Black Box testing. creating test cases) is smaller than
Black Box and White Box testing.
5 It is very difficult to discover hidden errors of the It is simple to discover hidden errors because it Difficult to discover the hidden
software because errors can be due to internal can be due to internal working which is deeply error. Might be found in user level
working which is unknown for Black Box testing. explored in White Box testing. testing.
Index Black Box Testing White Box Testing Grey Box Testing
6 It is not considered for algorithm testing. It is well suitable and recommended It is not considered for algorithm testing.
for algorithm testing.
7 Time consumption in Black Box testing depends White Box testing takes a long time Test cases designing can be done in a short time
upon the availability of the functional to design test cases due to lengthy period.
specifications. code.
8 Tester, developer and the end user can be the part Only tester and developer can be a Tester, developer and the end user can be the part
of testing. part of testing; the end user can not of testing.
involve.
9 It is the least time-consuming process among all The entire testing process is the most less time consuming than White Box testing.
the testing processes. time consuming among all the testing
processes.
10 Resilience and security against viral attacks are Resilience and security against viral Resilience and security against viral attacks are not
covered under Black Box testing. attacks are not covered under White covered under Grey Box testing.
Box testing.
11 The base of this testing is external expectations The base of this testing is coding Testing based on high-level database diagrams and
internal behavior is unknown. which is responsible for internal dataflow diagrams.
working.
12 It is less exhaustive than White Box and Grey Box It is most exhaustive between Black Partly exhaustive; depends upon the type of test
testing methods. Box and Grey Box testing methods. cases are coding based or GUI based.
Software Testing Life Cycle (STLC)
The procedure of software testing is also known as STLC
(Software Testing Life Cycle) which includes phases of the testing
process. The testing process is executed in a well-planned and
systematic manner. All activities are done to improve the quality of
the software product.
Let's see, the different steps of STLC.
Requirement Analysis
Environment setup:
Setup of the test environment is an independent activity and can be started along with Test Case Development.
This is an essential part of the manual testing procedure as without environment testing is not possible.
Environment setup requires a group of essential software and hardware to create a test environment. The testing
team is not involved in setting up the testing environment, its senior developers who create it.
Defect Logging:
Testers and developers evaluate the completion criteria of the software based on test coverage, quality, time
consumption, cost, and critical business objectives. This phase determines the characteristics and drawbacks of the
software. Test cases and bug reports are analyzed in depth to detect the type of defect and its severity.
Defect logging analysis mainly works to find out defect distribution depending upon severity and types.If any
defect is detected, then the software is returned to the development team to fix the defect, then the software is re-
tested on all aspects of the testing.
Entry Criteria Activities Deliverable
Test case execution report. It evaluates the completion criteria of the software Closure report
Defect report based on test coverage, quality, time consumption, Test metrics
cost, and critical business objectives.
Defect logging analysis finds out defect distribution
by categorizing in types and severity.
1. Test Identifier: A test identifier is nothing but an identifying reference unique to the document.
2. Introduction: The introduction is a brief overview of the scope and adjectives of the test to be conducted.
It also specifies the constraints related to the testing exercise.
3. References: This contains links to documents related to the test plan such as the project report or the test
configuration management plan.
4. Test items: Test items are the software entities related to the application under test.
5. Features not to be tested: They are those items which have been excluded from the realm of testing.
Under this, reasons for their omission are also mentioned.
6. Testing approach: This raises questions related to selection of strategy for testing. Be it black box/ white
box testing. This also includes decisions pertaining to the use of automation testing or sticking with manual
testing.
7. Pass/fail criteria: This is the documentation of those parts of the software product under test which have
passed or failed, upon the administration of test cases.
8. Suspension and resumption criteria: It is used for specifying a criteria in the form of limits for a certain
percentage of test cases which fail and beyond which the testing has to suspend temporarily until the resolution of
all issues.
9. Test deliverables: Includes the tools and documents developed, used and maintained for the testing process.
Their types are:
1. Deliverables provided before the Test the Testing Phase: Documents related to test cases and the test
design specifications.
2. Deliverables provided during the Test Phase: These include the simulators, bug logs, traceability matrices
and execution logs.
3. Deliverables for Post Testing Phase: These are the defect reports, test results and the test procedure
guideline with release notes.
10. Testing Tasks: All the tasks related to planning and execution of test cases.
11. Environmental needs: The environment is the platform of software and hardware on which the test cases are
carried out. It is also the landscape where the real user or business settings are simulated for testing the software
product on different servers, back/front end environment, different operating systems and the like. Requires
interaction between developers and testers for setting up of environment.
12. Roles and responsibilities: This aspect is related to assigning responsibilities in the form of project schedules
and deadlines to individuals as well as team leaders and managers.
How to Write a Good Test Plan?
The template defined above has made the process of creating a test plan easy. However, it is essential to create an
effective test plan that offers all the relevant information, as this document is delivered not only to the client, but at
times to the customer also. Therefore, to help you write a good test plan, here are some important points.
• Conduct product analysis.
• Develop an efficient test strategy.
• Define and allocate roles and responsibilities.
• Calculate all the anticipated risks.
• Develop a schedule for testing.
• Plan and prepare test environment.
Test Suite
test suite is the accumulation of test cases that will be run in a test progression until
some stopping criteria are met.
Test suite preparation involves the construction and allocation of test cases in some systematic way based on the specific testing
techniques used. For instance, when usage-based statistical testing is planned, the test case allocation will be defined by the
operational profiles created as the testing models.
Also known as “validation suite,” a test suite is a collection of various test cases that are intended to test a software
product or its specific functionality/feature, once the software development is accomplished.
Features of Test Suite:
Test suites offers various advantages to the team of testers as well as the organization they are working for.
Therefore, to offer you a better insight into its qualities, mentioned below are some of its important features:
1. Test suites are created after test plan.
2. It includes a number of tests and test cases.
3. Describes the goals and objective of test cases.
4. It has test parameters, such as application, environment, version, etc.
5. One can create test suites on the basis of the test cycle as well as the test scope.
6. It consists of various types of tests, such as functional or non-functional.
Test Test
Case-1 Case-2
Test Suit-1
Test Test
Case-3 Case-4
Test Test
Test Plan Test Suit-2 Case-1 Case-2
Test Test
Test Suit-3 Case-1 Case-2
Test
Case-3
The test case is defined as a group of conditions under which a tester determines whether a software application
is working as per the customer's requirements or not. Test case designing includes preconditions, case name,
input conditions, and expected result. A test case is a first level action and derived from test scenarios.
It is an in-details document that contains all possible inputs (positive as well as negative) and the navigation steps,
which are used for the test execution process. Writing of test cases is a one-time attempt that can be used in the
future at the time of regression testing.
Test case gives detailed information about testing strategy, testing process, preconditions, and expected output.
These are executed during the testing process to check whether the software application is performing the task for
that it was developed or not.
Test case helps the tester in defect reporting by linking defect with test case ID. Detailed test case documentation
works as a full proof guard for the testing team because if developer missed something, then it can be caught
during execution of these full-proof test cases.
To write the test case, we must have the requirements to derive the inputs, and the test scenarios must be written so
that we do not miss out on any features for testing. Then we should have the test case template to maintain the
uniformity, or every test engineer follows the same approach to prepare the test document.
When do we write a test case?
We will write the test case when we get the following:
• When the customer gives the business needs then, the developer starts developing and says that they need 3.5
months to build this product.
• And In the meantime, the testing team will start writing the test cases.
• Once it is done, it will send it to the Test Lead for the review process.
• And when the developers finish developing the product, it is handed over to the testing team.
• The test engineers never look at the requirement while testing the product document because testing is constant
and does not depends on the mood of the person rather than the quality of the test engineer.
TU01 Check Customer 1.Go to site Userid = guru99 User should Login As Expected Pass
Login with valid Data http://demo.guru99.com Password = pass99 into an application
2. Enter UserId
3. Enter Password
4. Click Submit
TU02 Check Customer 1.Go to Userid = guru99 User should not As Expected Pass
Login with invalid site http://demo.guru99.com Password = glass99 Login into an
Data 2.Enter UserId application
3.Enter Password
4.Click Submit
While drafting a test case to include the following information
• The description of what requirement is being tested
• The explanation of how the system will be tested
• The test setup like a version of an application under test, software, data files, operating system, hardware,
security access, physical or logical date, time of day, prerequisites such as other tests and any other setup
information pertinent to the requirements being tested
• Inputs and outputs or actions and expected results
• Any proofs or attachments
• Use active case language
• Test Case should not be more than 15 steps
• An automated test script is commented with inputs, purpose and expected results
• The setup offers an alternative to pre-requisite tests
• With other tests, it should be an incorrect business scenario order
Best Practice for writing good Test Case Example.
1. Test Cases need to be simple and transparent:
Create test cases that are as simple as possible. They must be clear and concise as the author of the test case
may not execute them.
Use assertive language like go to the home page, enter data, click on this and so on. This makes the
understanding the test steps easy and tests execution faster.
2. Create Test Case with End User in Mind
The ultimate goal of any software project is to create test cases that meet customer requirements and is easy to
use and operate. A tester must create test cases keeping in mind the end user perspective
3. Avoid test case repetition.
Do not repeat test cases. If a test case is needed for executing some other test case, call the test case by its test
case id in the pre-condition column
4. Do not Assume
Do not assume functionality and features of your software application while preparing test case. Stick to the
Specification Documents.
In both examples, we can see that there is a partition of two equally valid and invalid partitions, on applying
valid value such as OTP of six digits in the first example and mobile number of 10 digits in the second example,
both valid partitions behave same, i.e. redirected to the next page.
Another two partitions contain invalid values such as 5 or less than 5 and 7 or more than 7 digits in the first
example and 9 or less than 9 and 11 or more than 11 digits in the second example, and on applying these invalid
values, both invalid partitions behave same, i.e. redirected to the error page.
According to pressman:
For example, the Amount of test field accepts a Range (100-400) of values:
According to General Practice method:
Whenever the requirement is Range + criteria, then divide the Range into the internals and check for all these
values.
For example:
In the below image, the pressman technique is enough to test for an age text field for one valid and two invalids.
But, if we have the condition for insurance of ten years and above are required and multiple policies for various age
groups in the age text field, then we need to use the practice method.
Condition 3
If the requirement id Boolean (true/false), then derive the test case for both true/false values.
The Boolean value can be true and false for the radio button, checkboxes.
Stubs Drivers
Modules
What is meant by Stubs and Drivers?
In the field of software testing, the term stubs and drivers refers to the replica of the modules, which acts as a
substitute to the undeveloped or missing module. The stubs and drives are specifically developed to meet the
necessary requirements of the unavailable modules and are immensely useful in getting expected results.
Stubs and drivers are two types of test harness, which is a collection of software and test that is configured
together in order to test a unit of a program by stimulating variety of conditions while constantly monitoring its
outputs and behaviour. Stubs and drivers are used in top-down integration and bottom-up integration testing
respectively and are created mainly for the testing purpose.
Defining Stubs:
Stubs are used to test modules and are created by the team of testers during the process of Top-Down Integration
Testing. With the assistance of these test stubs testers are capable of stimulating the behaviour of the lower level
modules that are not yet integrated with the software. Moreover, it helps stimulates the activity of the missing
components.
Types of Stubs:
There are basically four types of stubs used in top-down approach of integration
testing, which are mentioned below:
Defining Drivers:
Drivers, like stubs, are used by software testers to fulfil the requirements of missing or incomplete components and
modules. These are usually complex than stubs and are developed during Bottom-Up approach of Integration
Testing. Drivers can be utilized to test the lower levels of the code, when the upper level of codes or modules are
not developed. Drivers act as pseudo codes that are mainly used when the stub modules are ready, but the primary
modules are not ready.
It is always preferable, to perform testing, in parallel, to the development process. Thus, it implies that subsequent
testing must be carried out, immediately after the development of the each module.
Module-A will be tested, as soon as, it develops. However, to carry out and validate the testing procedures in
respect of module-A, there urges the need of Module-B, which is not yet developed. The expected functionality of
the login page (module-A) could be validated, only if it is directed to the home page (Module-B), based on the
valid and correct inputs.
But, on the non-availability of the Module-B, it will not be possible to test module-A. These types of
circumstances, introduces the stubs & drivers in the process of software testing. A dummy module, representing
the basic functionality or feature of the module-B, is being developed, and thereafter, it is being integrated with the
module-A, to perform testing, efficiently.
Similarly, stubs and drivers, are used to fulfil the requirements of other modules,
Why are Stubs & Drivers Required?
Though, the important of stubs and drivers is immense during software testing, but its relevance as well as the
requirement ends once the equivalent module is created. As they act as a temporary replacement of modules, these
role in testing culminates once final output is generated. Therefore, these pseudo modules or stubs and drivers are
mainly used for following reasons:
1. Commonly used in porting, distributed computing, as well as general software development.
2. Used for meeting necessary requirements unavailable modules.
3. They are required when the system needs to interact with external systems.
4. Stubs and drivers are used to test modules.
5. Stubs are used to test the functionality of modules, whereas drivers are used when the main module is not ready.
Stubs Drivers
1. Used in Top-Down Integration Testing. 1.Used in Bottom-Up Integration Testing.
2. A piece of code that emulates the called function. 2. A piece of code that emulates a calling function.
3. Stubs stimulates the activity of missing and not 3. Drivers pass test cases to another code and invoke
developed modules. modules under testing.
4. These are created when high level modules are 4. These are created when lower level modules are
tested and lower level modules are not developed. tested and higher level modules are not yet developed.
As a tester, you may think that ‘Designing Test cases is challenging enough, then why bother about
something as trivial as Test Data’. The purpose of this tutorial is to introduce you to Test Data, its importance
and give practical tips and tricks to generate test data quickly. So, let's Begin!
Typically test data is created in-sync with the test case it is intended to be used for.
Test Data can be Generated -
• Manually
• Mass copy of data from production to testing environment
• Mass copy of test data from legacy client systems
• Automated Test Data Generation Tools
• Typically sample data should be generated before you begin test execution because it is difficult to handle
test data management otherwise. Since in many testing environments creating test data takes multiple pre-
steps or very time-consuming test environment configurations. . Also If test data generation is done while
you are in test execution phase you may exceed your testing deadline.
Test Data for White Box Testing
In White Box Testing, test data Management is derived from direct examination of the code to be tested.
Test data may be selected by taking into account the following things:
• It is desirable to cover as many branches as possible; testing data can be generated such that all branches
in the program source code are tested at least once
• Path testing: all paths in the program source code are tested at least once - test data preparation can done
to cover as many cases as possible
• Negative API Testing:
• Testing data may contain invalid parameter types used to call different methods
• Testing data may consist in invalid combinations of arguments which are used to call the program's
methods
Test Data for Black Box Testing
In Black Box Testing the code is not visible to the tester. Your functional test cases can have test data meeting
following criteria -
• No data: Check system response when no data is submitted
• Valid data: Check system response when Valid test data is submitted
• Invalid data: Check system response when InValid test data is submitted
• Illegal data format: Check system response when test data is in an invalid format
• Boundary Condition Dataset: Test data meeting boundary value conditions
• Equivalence Partition Data Set: Test data qualifying your equivalence partitions.
• Decision Table Data Set: Test data qualifying your decision table testing strategy
• State Transition Test Data Set: Test data meeting your state transition testing strategy
• Use Case Test Data: Test Data in-sync with your use cases.
Test Data for Security Testing
Security Testing is the process that determines if an information system protects data from malicious intent. The set
of data that need to be designed in order to fully test a software security must cover the following topics:
• Confidentiality: All the information provided by clients is held in the strictest confidence and is not shared with
any outside parties. As a short example, if an application uses SSL, you can design a set of test data which
verifies that the encryption is done correctly.
• Integrity: Determine that the information provided by the system is correct. To design suitable test data you can
start by taking an in-depth look at the design, code, databases and file structures.
• Authentication: Represents the process of establishing the identity of a user. Testing data can be designed as a
different combination of usernames and passwords and its purpose is to check that only the authorized people
are able to access the software system.
• Authorization: Tells what are the rights of a specific user. Testing data may contain a different combination of
users, roles and operations in order to check only users with sufficient privileges are able to perform a particular
operation.
Testing Documentation
Testing documentation is the documentation of artifacts that are created during or before the testing of a software
application. Documentation reflects the importance of processes for the customer, individual and organization.
Projects which contain all documents have a high level of maturity. Careful documentation can save the time,
efforts and wealth of the organization.
There is the necessary reference document, which is prepared by every test engineer before stating the test
execution process. Generally, we write the test document whenever the developers are busy in writing the code.
Once the test document is ready, the entire test execution process depends on the test document. The primary
objective for writing a test document is to decrease or eliminate the doubts related to the testing activities.
Test
Case
Test
Test Test Case
Document Scenario
Test
Case
Test case
It is an in-details document that describes step by step procedure to test an application. It consists of the complete
navigation steps and inputs and all the scenarios that need to be tested for the application. We will write the test
case to maintain the consistency, or every tester will follow the same approach for organizing the test document.
Test plan
It is a document that is prepared by the managers or test lead. It consists of all information about the testing
activities. The test plan consists of multiple components such as Objectives, Scope, Approach, Test
Environments, Test methodology, Template, Role & Responsibility, Effort estimation, Entry and Exit
criteria, Schedule, Tools, Defect tracking, Test Deliverable, Assumption, Risk, and Mitigation Plan or
Contingency Plan.
Traceability Matrix
Traceability matrix is a table type document that is used in the development of software application to trace
requirements. It can be used for both forward (from Requirements to Design or Coding) and backward (from
Coding to Requirements) tracing. It is also known as Requirement Traceability Matrix (RTM) or Cross
Reference Matrix (CRM).
It is prepared before the test execution process to make sure that every requirement is covered in the form of a
Test case so that we don't miss out any testing. In the RTM document, we map all the requirements and
corresponding test cases to ensure that we have written all the test cases for each condition.
The test engineer will prepare RTM for their respective assign modules, and then it will be sent to the Test
Lead. The Test Lead will go repository to check whether the Test Case is there or not and finally Test Lead
consolidate and prepare one necessary RTM document.
Note:
We go for RTM after approval and before execution so that we don't miss out on any Test Case for any requirement.
We don't write RTM while writing the testing because it can be incomplete, and after writing the test case, we don't
go here because the test case can be rejected.
RTM document ensures that at least there is one test case written in each requirement, whereas it does not talk
about all possible test cases written for the particular requirement.
RTM Template
Below is the sample template of requirement traceability matrix (RTM):
Example of RTM template
Let us one sample of RTM template for better understanding:
Forward traceability
The forward traceability test matrix is used to ensure that every business's needs or requirements are executed
correctly in the application and also tested rigorously. The main objective of this is to verify whether the product
developments are going in the right direction. In this, the requirements are mapped into the forward direction to
the test cases.
Requirements
Test Case
Backward or reverse traceability
The reverse or backward traceability is used to check that Requirements
we are not increasing the space of the product by
enhancing the design elements, code, test other things
which are not mentioned in the business needs. And the
main objective of this that the existing project remains in
the correct direction. In this, the requirements are mapped
Test Case
into the backward direction to the test cases.
Bi-directional traceability
It is a combination of forwarding and backward traceability matrix, which is used to make sure that all the
business needs are executed in the test cases. It also evaluates the modification in the requirement which is
occurring due to the bugs in the application.
Forward Backword
Requirements Requirements
Test data
It is data that occurs before the test is executed. It is mainly used when we are implementing the test case. Mostly,
we will have the test data in the Excel sheet format and entered manually while performing the test case.
The test data can be used to check the expected result, which means that when the test data is entered, the expected
outcome will meet the actual result and also check the application performance by entering the in-correct input data.
Bug report
The bug report is a document where we maintain a summary of all the bugs which occurred during the testing
process. This is a crucial document for both the developers and test engineers because, with the help of bug
reports, they can easily track the defects, report the bug, change the status of bugs which are fixed successfully,
and also avoid their repetition in further process.
Test execution report
It is the document prepared by test leads after the entire testing execution process is completed. The test summary
report defines the constancy of the product, and it contains information like the modules, the number of written test
cases, executed, pass, fail, and their percentage. And each module has a separate spreadsheet of their respective
module.
Activities Explanation
Architecture Review •The architecture review activities contain all business-level processes such as network diagram, load
balancing, server locations, protocol definitions, test equipment, database accessibility, etc.
Use Cases •It is used to authenticates all the end-user actions along with associated input and output.
Requirements •If the use case is more comprehensive and detailed, we can make more precise and inclusive test
Validation cases.
Functional •The functional requirement validation activity is used to make sure that all necessary elements
Requirements identify correctly.
Validation •And it also took care of the software, interface listings, network requirements, hardware, and
database functionality.
Field Dictionary •In the field dictionary validation, we will test each field in the user interface specified to create field-
Validation level validation test cases.
•And we can check the fields for error messages, minimum or maximum length, list values, etc.
Prototype/Screen •The prototype validation activity contains the authentication of requirements and uses cases.
Mockup Validation
Why we need Static Testing?
We required Static testing whenever we encounter the following situation while testing an application or the
software:
• Dynamic Testing is time-consuming
• Flaws at earlier stages/identification of Bugs
• Dynamic Testing is expensive
• Increased size of the software
• Dynamic Testing is time-consuming
We need static testing to test the application as dynamic testing is time-taking process even though the dynamic testing identifies
the bug and provides some information about the bug.
• Flaws at earlier stages/identification of Bugs
When we are developing the software, we cannot completely rely on Dynamic testing as it finds the bugs or defects of the
application/software at a later stage because it will take the programmer's plenty of time and effort to fix the bugs.
• Dynamic Testing is expensive
We need to perform the static testing on the software product because dynamic testing is more expensive than static testing.
Involving the test cases is expensive in dynamic testing as the test cases have been created in the initial stages.
And we also need to preserve the implementation and validation of the test case, which takes lots of time from the test
engineers.
• Increased size of the software
Whenever we test the software, it will increase the size of the software product, which we cannot handle because of the
reduction in the productivity of code coverage.
That is why we require static testing to get free from the bugs or defects earlier in the software development life cycle.
Objectives of Static testing
The main objectives of performing static testing is as below:
• Static testing will decrease the flaws in production.
• Static testing will identify, anticipate and fix the bugs at the earliest possible time.
• It is used to save both time and cost.
• It is used to identify defects in the early stage of SDLC, where we can fix them easily.
Static
Review
Analysis
Review
In static testing, the review is a technique or a process
implemented to find the possible bugs in the application.
We can easily identify and eliminate faults and defects in
the various supporting documents such as SRS [Software
Requirements Specifications] in the review process.
In other words, we can say that a review in Static Testing Review
is that where all the team members will understand about
the project's progress.
In static testing, reviews can be divided into four
different parts, which are as follows: Inspection
• Informal reviews
• Walkthroughs
• Technical/peer review
• Inspections
• Informal reviews
In informal review, the document designer place the contents in front of viewers, and everyone gives
their view; therefore, bugs are acknowledged in the early stage.
• Walkthrough
Generally, the walkthrough review is used to performed by a skilled person or expert to verify the
bugs. Therefore, there might not be problem in the development or testing phase.
• Peer review
In Peer review, we can check one another's documents to find and resolve the bugs, which is generally
done in a team.
• Inspection
In review, the inspection is essentially verifying the document by the higher authority, for example,
the verification of SRS [software requirement specifications] document.
Static Analysis
Another Static Testing technique is static analysis, which is used to contain the assessment of the code quality,
which is established by developers.
We can use the different tools to perform the code's analysis and evaluation of the same.
In other words, we can say that developers' developed code is analyzed with some tools for structural bugs, which
might cause the defects.
The static analysis will also help us to identify the below errors:
Dead code
Unused variables
Endless loops
Incorrect syntax Control
Data Flow
Variable with undefined value Flow
Static
Analysis
In static testing, Static Analysis can be further
classified into three parts, which are as Cyclomatic
discuss below: Complexity
1. Data Flow: In static analysis, the data flow is connected to the stream processing.
2. Control Flow: Generally, the control flow is used to specify how the commands or instructions are
implemented.
3. Cyclomatic Complexity: It is the measurement of the program's complexity, which is mostly linked to
the number of independent paths in the control flow graph of the program.
Feature of CheckStyle
Following are the most common features of CheckStyle:
•It can check various characteristics of our source code.
•The CheckStyle code has the capability to verify the code layout and formatting issues.
•It can also help to identify the method design problems, class design problems.
SourceMeter
It is an advanced tool for the specific static source code analysis of various programming languages such
as C/C++, C#, Java, Python, and RPG projects.
With the SourceMeter tool's help, we can easily identify the vulnerable spots of a system under development
from the source code.
The free version with partial functionality of SourceMeter can be accessible for all programming languages.
In SourceMeter, we can use the output of the analysis, the quality of the analyzed source code to enhance and
developed both the short and long term in a directed way.
Feature of SourceMeter
The most commonly used features of the SourceMeter tool are as follows:
•It provides the most precise coding error detection.
•The SourceMeter tool will provide a deep static code analysis.
•It improved the user interface with the help of third-party integration.
•It will provide platform-independent command-line tools.
Soot
It is a Java optimization framework, which means that it is a framework for analyzing and transforming Java
and Android applications where we can test the following aspects:
•Named module and modular jar files.
•Automatic modules, which means the modules are repeatedly created from jars in the module-path.
•Exploded modules
•Resolving modules in Soot's
And a Soot can also produce possibly transformed code in the various output formats such as Android bytecode,
Java bytecode Jasmin, and Jimple.
Advantages of Static Testing
The advantages of static testing are as follows:
• Improved Product quality
Static testing will enhance the product quality because it identifies the flaws or bugs in the initial stage of
software development.
• Improved the efficiency of Dynamic testing
The usage of Static testing will improve Dynamic Testing efficiency because the code gets cleaner and
better after executing Static Testing.
As we understood above, static Testing needs some efforts and time to generate and keep good quality
test cases.
• Reduced SDLC cost
The Static Testing reduced the SDLC cost because it identifies the bugs in the earlier stages of the
software development life cycle. So, it needs less hard work and time to change the product and fix
them.
• Immediate evaluation & feedback
The static testing provides us immediate evaluation and feedback of the software during each phase while
developing the software product.
• Exact location of bug is traced
When we perform the static testing, we can easily identify the bugs' exact location compared to the
dynamic Testing.
Some Terminologies
Error, Mistake, Bug, Fault and Failure
People make errors. A good synonym is mistake. This may be a syntax error or misunderstanding of
specifications. Sometimes, there are logical errors.
When developers make mistakes while coding, we call these mistakes “bugs”.
A fault is the representation of an error, where representation is the mode of expression, such as narrative text,
data flow diagrams, ER diagrams , source code etc. Defect is a good synonym for fault.
A failure occurs when a fault executes. A particular fault may cause different failures, depending on how it has
been exercised.
for a program of n variables, boundary value analysis yield 4n + 1 test cases.