SlideShare a Scribd company logo
1
List of Contents
Abstract................................................................................................................................1
Chapter 1 Introducing.......................................................................................................3
1.1 selenium........................................................................................................................3
1.2 Brief History of Selenium Project…..........................................................................4-5
1.3 Selenium’s tool suite…..............................................................................................6-7
Chapter 2 Testing Overview.............................................................................................8
2.2 What is testing? ….........................................................................................................9
2.3 Who does testing? ….....................................................................................................9
2.4Test Automation should beused wherever possible to Reduce Time…......................................10
2.5 When testing is doing…...............................................................................................11
Chapter 3 Difference........................................................................................................12
3.1 Difference between Testing and Debugging................................................................12
Chapter 4 Types of Testing.............................................................................................13
4.1 Testing Types...............................................................................................................13
4.2 Manual Testing............................................................................................................14
4.3 Automation Testing.....................................................................................................15
Chapter 5 Method............................................................................................................16
5.1 Testing Methods ..........................................................................................................16
5.2 Black Box Testing........................................................................................................16
5.3 White Box Testing.......................................................................................................17
5.4 Grey Box Testing….....................................................................................................18
5.5 Comparison of Testing method..............................................................................19-20
Chapter 6 Level................................................................................................................21
6.1 Levels of Testing..........................................................................................................21
6.2 Functional Testing.......................................................................................................22
6.3 Unit Testing.................................................................................................................23
6.4 Integration Testing.......................................................................................................24
6.5 System Testing.............................................................................................................25
6.6 Regression Testing…...................................................................................................25
2
6.6 Acceptance Testing......................................................................................................26
6.7 Non-Functional Testing...............................................................................................26
6.8 Performance Testing....................................................................................................27
6.9 Usability Testing..........................................................................................................28
6.10 Security Testing…................................................................................................29-30
Chapter 7 Documentation...............................................................................................31
7.1 Testing Documentation...........................................................................................31-34
Chapter 8 Testing code and screenshort.......................................................................35
8.1 Testing short Screen...............................................................................................35-37
8.2 Coding…................................................................................................................38-40
Chapter 9 Reference........................................................................................................41
3
Chapter 1
1.1 Introducing selenium
Selenium is a set of different software tools each with a different approach to supporting
test automation. Most Selenium QA Engineers focus on the one or two tools that most
meet the needs of their project, however learning all the tools will give you many
different options for approaching different test automation problems. The entire suite of
tools results in a rich set of testing functions specifically geared to the needs of testing of
web applications of all types. These operations are highly flexible, allowing many options
for locating UI elements and comparing expected test results against actual application
behavior. One of Selenium’s key features is the support for executing one’s tests on
multiple browser platforms.
Selenium WebDriver fits in the same role as RC did, and has incorporated the original
1.x bindings. It refers to both the language bindings and the implementations of the
individual browser controlling code. This is commonly referred to as just "WebDriver" or
sometimes as Selenium 2.
Selenium 1.0 + WebDriver = Selenium 2.0
 WebDriver is designed in a simpler and more concise programming interface
along with addressing some limitations in the Selenium-RC API.
 WebDriver is a compact Object Oriented API when compared to Selenium1.0
 WebDriver overcomes the limitation of Selenium RC's Single Host origin policy
Testing and Automation Many, perhaps most, software applications today are written as
web-based applications to be run in an Internet browser. The effectiveness of testing
these applications varies widely among companies and organizations. In an era of highly
interactive and responsive software processes where many organizations are using some
form of Agile methodology, test automation is frequently becoming a requirement for
software projects. Test automation is often the answer. Test automation means using a
4
software tool to run repeatable tests against the application to be tested. For regression
testing this provides that responsiveness.
There are many advantages to test automation. Most are related to the repeatability of the
tests and the speed at which the tests can be executed. There are a number of commercial
and open source tools available for assisting with the development of test automation.
Selenium is possibly the most widely-used open source solution. This user’s guide will
assist both new and experienced Selenium users in learning effective techniques in
building test automation for web applications.
This introduces Selenium, teaches its features, and presents commonly used best
practices accumulated from the Selenium community. Many examples are provided.
Also, technical information on the internal structure of Selenium and recommended uses
of Selenium are provided.
Test automation has specific advantages for improving the long-term efficiency of a
software team’s testing processes. Test automation supports:
5
1.2 Brief History of Selenium Project
Selenium first came to life in 2004 when Jason Huggins was testing an internal
application at Thought Works. Being a smart guy, he realized there were better uses of
his time than manually stepping through the same tests with every change he made. He
developed a JavaScript library that could drive interactions with the page, allowing him
to automatically rerun tests against multiple browsers. That library eventually became
Selenium Core, which underlies all the functionality of Selenium Remote Control (RC)
and Selenium IDE. Selenium RC was ground-breaking because no other product allowed
you to control a browser from a language of your choice.
While Selenium was a tremendous tool, it wasn’t without its drawbacks. Because of its
JavaScript based automation engine and the security limitations browsers apply to
JavaScript, different things became impossible to do. To make things worse, Webapps
became more and more powerful over time, using all sorts of special features new
browsers provide and making these restrictions more and more painful.
In 2006 a plucky engineer at Google named Simon Stewart started work on a project he
called WebDriver. Google had long been a heavy user of Selenium, but testers had to
work around the limitations of the product. Simon wanted a testing tool that spoke
directly to the browser using the ‘native’ method for the browser and operating system,
thus avoiding the restrictions of a sandboxed JavaScript environment. The WebDriver
project began with the aim to solve the Selenium’ pain-points.
Jump to 2008. The Beijing Olympics mark China’s arrival as a global power, massive
mortgage default in the United States triggers the worst international recession since the
Great Depression, The Dark Knight is viewed by every human (twice), still reeling from
the untimely loss of Heath Ledger. But the most important story of that year was the
merging of Selenium and WebDriver. Selenium had massive community and commercial
support, but WebDriver was clearly the tool of the future. The joining of the two tools
provided a common set of features for all users and brought some of the brightest minds
in test automation under one roof. Perhaps the best explanation for why WebDriver and
6
Selenium are merging was detailed by Simon Stewart, the creator of WebDriver, in a
joint email to the WebDriver and Selenium community on August 6, 2009.
“Why are the projects merging? Partly because WebDriver addresses some shortcomings
in selenium (by being able to bypass the JS sandbox, for example. And we’ve got a
gorgeous API), partly because selenium addresses some shortcomings in WebDriver
(such as supporting a broader range of browsers) and partly because the main selenium
contributors and I felt that it was the best way to offer users the best possible
framework”.
7
1.3 Selenium’s Tool Suite
1.3.1 Selenium 2(aka Selenium webDriver):
Selenium 2 is the future direction of the project and the newest addition to the Selenium
toolkit. This brand new automation tool provides all sorts of awesome features, including
a more cohesive and objects oriented API as well as an answer to the limitations of the
old implementation.
As you can read in Brief History of The Selenium Project, both the Selenium and
WebDriver developers agreed that both tools have advantages and that merging the two
projects would make a much more robust automation tool.
Selenium 2.0 is the product of that effort. It supports the WebDriver API and underlying
technology, along with the Selenium 1 technology underneath the WebDriver API for
maximum flexibility in porting your tests. In addition, Selenium 2 still runs Selenium 1’s
Selenium RC interface for backwards compatibility.
1.3.2 Selenium 1(aka selenium RC or Remote controller):
As you can read in Brief History of The Selenium Project, Selenium RC was the main
Selenium project for a long time, before the WebDriver/Selenium merge brought up
Selenium 2, the newest and more powerful tool.
Now Selenium 1 is deprecated and is not actively supported (mostly in maintenance
mode).
1.3.3 Selenium IDE:
Selenium IDE (Integrated Development Environment) is a prototyping tool for building
test scripts. It is a Firefox plug-in and provides an easy-to-use interface for developing
automated tests. Selenium IDE has a recording feature, which records user actions as they
are performed and then exports them as a reusable script in one of many programming
languages that can be later executed.
8
Note
Even though Selenium IDE has a “Save” feature that allows users to keep the tests in a
table-based format for later import and execution, it is not designed to run your test
passes nor is it designed to build all the automated tests you will need. Specifically,
Selenium IDE doesn’t provide iteration or conditional statements for test scripts. At the
time of writing there is no plan to add such thing. The reasons are partly technical and
partly based on the Selenium developers encouraging best practices in test automation
which always requires some amount of programming. Selenium IDE is simply intended
as a rapid prototyping tool. The Selenium developers recommend for serious, robust test
automation either Selenium 2 or Selenium 1 to be used with one of the many supported
programming languages.
9
Chapter 2
Testing Overview
2.1Who does Testing?
It depends on the process and the associated stakeholders of the project(s). In the IT
industry, large companies have a team with responsibilities to evaluate the developed
software in context of the given requirements. Moreover, developers also conduct
testing which is called Unit Testing. In most cases, the following professionals are
involved in testing a system within their respective capacities:
 Software Tester
 Software Developer
 Project Lead/Manager
 End User
Different companies have different designations for people who test the software on the
basis of their experience and knowledge such as Software Tester, Software Quality
Assurance Engineer, QA Analyst, etc.
It is not possible to test the software at any time during its cycle. The next two sections
state when testing should be started and when to end it during the SDLC.
2.2When toStart Testing?
An early start to testing reduces the cost and time to rework and produce error-free
software that is delivered to the client. However in Software Development Life Cycle
(SDLC), testing can be started from the Requirements Gathering phase and continued
till the deployment of the software. It also depends on the development model that is
being used. For example, in the Waterfall model, formal testing is conducted in the
testing phase; but in the incremental model, testing is performed at the end of every
increment/iteration and the whole application is tested at the end.
Testing is done in different forms at every phase of SDLC:
10
 During the requirement gathering phase, the analysis and verification of
requirements are also considered as testing.
 Reviewing the design in the design phase with the intent to improve the design is
also considered as testing.
 Testing performed by a developer on completion of the code is also categorized
as testing.
2.3When toStopTesting?
It is difficult to determine when to stop testing, as testing is a never-ending process and
no one can claim that a software is 100% tested. The following aspects are to be
considered for stopping the testing process:
 Testing Deadlines
 Completion of test case execution
 Completion of functional and code coverage to a certain point
 Bug rate falls below a certain level and no high-priority bugs are identified
 Management decision
2.3.1Testingis Too Expensive
Reality: There is a saying, pay less for testing during software development or pay more
for maintenance or correction later. Early testing saves both time and cost in many
aspects, however reducing the cost without testing may result in improper design of a
software application rendering the product useless.
2.3.2Testing is Time-Consuming
Reality: During the SDLC phases, testing is never a time-consuming process. However
diagnosing and fixing the errors identified during proper testing is a time-consuming but
productive activity.
11
2.3.3Only Fully DevelopedProducts are Tested
Reality: No doubt, testing depends on the source code but reviewing requirements and
developing test cases is independent from the developed code. However iterative or
incremental approach as a development life cycle model may reduce the dependency of
testing on the fully developed software.
2.3.4Complete Testingis Possible
Reality: It becomes an issue when a client or tester thinks that complete testing is
possible. It is possible that all paths have been tested by the team but occurrence of
complete testing is never possible. There might be some scenarios that are never
executed by the test team or the client during the software development life cycle and
may be executed once the project has been deployed.
2.4A TestedSoftware is Bug-Free
Reality: This is a very common myth that the clients, project managers, and the
management team believes in. No one can claim with absolute certainty that a software
application is 100% bug-free even if a tester with superb testing skills has tested the
application.
2.4.1MissedDefects are due toTesters
Reality: It is not a correct approach to blame testers for bugs that remain in the
application even after testing has been performed. This myth relates to Time, Cost, and
Requirements changing Constraints. However the test strategy may also result in bugs
being missed by the testing team.
2.4.2Testers are Responsible forQuality ofProduct
Reality: It is a very common misinterpretation that only testers or the testing team
should be responsible for product quality. Testers’ responsibilities include the
identification of bugs to the stakeholders and then it is their decision whether they will
fix the bug or release the software. Releasing the software at the time puts more pressure
on the testers, as they will be blamed for any error.
12
2.4.3TestAutomation should be usedwherever possible toReduce Time
Reality: Yes, it is true that Test Automation reduces the testing time, but it is not
possible to start test automation at any time during software development. Test
automaton should be started when the software has been manually tested and is stable to
some extent. Moreover, test automation can never be used if requirements keep
changing.
2.5Anyone can TestaSoftware Application
Reality: People outside the IT industry think and even believe that anyone can test
software and testing is not a creative job. However testers know very well that this is a
myth. Thinking alternative scenarios, try to crash software with the intent to explore
potential bugs is not possible for the person who developed it.
2.5.1A Tester's onlyTaskis toFind Bugs
Reality: Finding bugs in software is the task of the testers, but at the same time, they are
domain experts of the particular software. Developers are only responsible for the
specific component or area that is assigned to them but testers understand the overall
workings of the software, what the dependencies are, and the impacts of one module on
another module.
13
Chapter 3
Difference
3.1Testing and Debugging
Testing: It involves identifying bug/error/defect in software without correcting it.
Normally professionals with a quality assurance background are involved in bugs
identification. Testing is performed in the testing phase.
Debugging: It involves identifying, isolating, and fixing the problems/bugs. Developers
who code the software conduct debugging upon encountering an error in the code.
Debugging is a part of White Box Testing or Unit Testing. Debugging can be performed
in the development phase while conducting Unit Testing or in phases while fixing the
reported bugs.
14
Chapter4
Type ofTesting
4.1Manual Testing
Manual testing includes testing a software manually, i.e., without using any automated
tool or any script. In this type, the tester takes over the role of an end-user and tests the
software to identify any unexpected behavior or bug. There are different stages for
manual testing such as unit testing, integration testing, system testing, and user
acceptance testing.
Testers use test plans, test cases, or test scenarios to test software to ensure the
completeness of testing. Manual testing also includes exploratory testing, as testers
explore the software to identify errors in it.
4.2Automation Testing
Automation testing, which is also known as Test Automation, is when the tester writes
scripts and uses another software to test the product. This process involves automation
of a manual process. Automation Testing is used to re-run the test scenarios that were
performed manually, quickly, and repeatedly.
Apart from regression testing, automation testing is also used to test the application from
load, performance, and stress point of view. It increases the test coverage, improves
accuracy, and saves time and money in comparison to manual testing.
15
4.3What is Automate?
It is not possible to automate everything in software. The areas at which a user can make
transactions such as the login form or registration forms, any area where large number of
users can access the software simultaneously should be automated.
Furthermore, all GUI items, connections with databases, field validations, etc. can be
efficiently tested by automating the manual process.
4.3.1When toAutomate?
Test Automation should be used by considering the following aspects of a software:
 Large and critical projects
 Projects that require testing the same areas frequently
 Requirements not changing frequently
 Accessing the application for load and performance with many virtual users
 Stable software with respect to manual testing
 Availability of time
4.3.2How toAutomate?
Automation is done by using a supportive computer language like VB scripting and an
automated software application. There are many tools available that can be used to write
automation scripts. Before mentioning the tools, let us identify the process that can be
used to automate the testing process:
 Identifying areas within a software for automation
 Selection of appropriate tool for test automation
 Writing test scripts
 Development of test suits
 Execution of scripts
 Create result reports
16
 Identify any potential bug or performance issues
17
Chapter 5
Method of Testing
There are different methods that can be used for software testing. This chapter briefly
describes the methods available.
5.1Black-BoxTesting
The technique of testing without having any knowledge of the interior workings of the
application is called black-box testing. The tester is oblivious to the system architecture
and does not have access to the source code. Typically, while performing a black-box
test, a tester will interact with the system's user interface by providing inputs and
examining outputs without knowing how and where the inputs are worked upon.
The following table lists the advantages and disadvantages of black-box testing.
Advantages Disadvantages
 Well suited and efficient for large
code segments.
 Code access is not required.
 Clearly separates user's perspective
from the developer's perspective
through visibly defined roles.
 Large numbers of moderately
skilled testers can test the
application with no knowledge of
implementation, programming
language, or operating systems.
 Limited coverage, since only a
selected number of test scenarios is
actually performed.
 Inefficient testing, due to the fact that
the tester only has limited knowledge
about an application.
 Blind coverage, since the tester
cannot target specific code segments
or error-prone areas.
 The test cases are difficult to design.
18
5.2White-Box Testing
White-box testing is the detailed investigation of internal logic and structure of the code.
White-box testing is also called glass testing or open-box testing. In order to
perform white-box testing on an application, a tester needs to know the internal
workings of the code.
The tester needs to have a look inside the source code and find out which unit/chunk of
the code is behaving inappropriately.
The following table lists the advantages and disadvantages of white-box testing.
Advantages Disadvantages
 As the tester has knowledge of the
source code, it becomes very easy to
find out which type of data can help
in testing the application effectively.
 It helps in optimizing the code.
 Extra lines of code can be removed
which can bring in hidden defects.
 Due to the tester's knowledge about
the code, maximum coverage is
attained during test scenario writing.
 Due to the fact that a skilled tester is
needed to perform white-box
testing, the costs are increased.
 Sometimes it is impossible to look
into every nook and corner to find
out hidden errors that may create
problems, as many paths will go
untested.
 It is difficult to maintain white-box
testing, as it requires specialized
tools like code analyzers and
debugging tools.
19
5.3Grey-Box Testing
Grey-box testing is a technique to test the application with having a limited knowledge
of the internal workings of an application. In software testing, the phrase the more you
know, the better carries a lot of weight while testing an application.
Mastering the domain of a system always gives the tester an edge over someone with
limited domain knowledge. Unlike black-box testing, where the tester only tests the
application's user interface; in grey-box testing, the tester has access to design
documents and the database. Having this knowledge, a tester can prepare better test data
and test scenarios while making a test plan.
Advantages Disadvantages
 Offers combined benefits of black-
box and white-box testing wherever
possible.
 Grey box testers don't rely on the
source code; instead they rely on
interface definition and functional
specifications.
 Based on the limited information
available, a grey-box tester can design
excellent test scenarios especially
around communication protocols and
data type handling.
 The test is done from the point of
view of the user and not the designer.
 Since the access to source code is
not available, the ability to go over
the code and test coverage is
limited.
 The tests can be redundant if the
software designer has already run a
test case.
 Testing every possible input stream
is unrealistic because it would take
an unreasonable amount of time;
therefore, many program paths will
go untested.
20
5.4A Comparison ofTesting Methods
The following table lists the points that differentiate black-box testing, grey-box testing,
and white-box testing.
Black-Box Testing Grey-Box Testing White-Box Testing
The internal workings of an
application need not be
known.
The tester has limited
knowledge of the internal
workings of the application.
Tester has full knowledge
of the internal workings of
the application.
Also known as closed-box
testing, data-driven testing,
or functional testing.
Also known as translucent
testing, as the tester has
limited knowledge of the
insides of the application.
Also known as clear-box
testing, structural testing,
or code-based testing.
Performed by end-users
and also by testers and
developers.
Performed by end-users and
also by testers and developers.
Normally done by testers
and developers.
Testing is based on
external expectations -
Internal behavior of the
application is unknown.
Testing is done on the basis of
high-level database diagrams
and data flow diagrams.
Internal workings are fully
known and the tester can
design test data
accordingly.
It is exhaustive and the
least time-consuming.
Partly time-consuming and
exhaustive.
The most exhaustive and
time-consuming type of
testing.
21
Not suited for algorithm
testing.
Not suited for algorithm
testing.
Suited for algorithm
testing.
This can only be done by
trial-and-error method.
Data domains and internal
boundaries can be tested, if
known.
Data domains and internal
boundaries can be better
tested.
22
Chapter 6 Testing Level
There are different levels during the process of testing. In this chapter, a brief
description is provided about these levels.
Levels of testing include different methodologies that can be used while conducting
software testing. The main levels of software testing are:
 Functional Testing
 Non-functional Testing
6.1Functional Testing
This is a type of black-box testing that is based on the specifications of the software that
is to be tested. The application is tested by providing input and then the results are
examined that need to conform to the functionality it was intended for. Functional
testing of a software is conducted on a complete, integrated system to evaluate the
system's compliance with its specified requirements.
There are five steps that are involved while testing an application for functionality.
Steps Description
I The determination of the functionality that the intended application is meant to
perform.
II The creation of test data based on the specifications of the application.
III The output based on the test data and the specifications of the application.
IV The writing of test scenarios and the execution of test cases.
23
V The comparison of actual and expected results based on the executed test cases.
An effective testing practice will see the above steps applied to the testing policies of
every organization and hence it will make sure that the organization maintains the
strictest of standards when it comes to software quality.
6.2Unit Testing
This type of testing is performed by developers before the setup is handed over to the
testing team to formally execute the test cases. Unit testing is performed by the
respective developers on the individual units of source code assigned areas. The
developers use test data that is different from the test data of the quality assurance team.
The goal of unit testing is to isolate each part of the program and show that individual
parts are correct in terms of requirements and functionality.
6.2.1 Limitations of Unit Testing
Testing cannot catch each and every bug in an application. It is impossible to evaluate
every execution path in every software application. The same is the case with unit
testing.
There is a limit to the number of scenarios and test data that a developer can use to verify
a source code. After having exhausted all the options, there is no choice but to stop unit
testing and merge the code segment with other units.
6.3Integration Testing
Integration testing is defined as the testing of combined parts of an application to
determine if they function correctly. Integration testing can be done in two ways:
Bottom-up integration testing and Top-down integration testing.
24
S.N. Integration Testing Method
1 Bottom-up integration
This testing begins with unit testing, followed by tests of progressively higher-level
combinations of units called modules or builds.
2 Top-down integration
In this testing, the highest-level modules are tested first and progressively, lower-
level modules are tested thereafter.
In a comprehensive software development environment, bottom-up testing is usually
done first, followed by top-down testing. The process concludes with multiple tests of
the complete application, preferably in scenarios designed to mimic actual situations.
6.4SystemTesting
System testing tests the system as a whole. Once all the components are integrated, the
application as a whole is tested rigorously to see that it meets the specified Quality
Standards. This type of testing is performed by a specialized testing team.
System testing is important because of the following reasons:
 System testing is the first step in the Software Development Life Cycle, where
the application is tested as a whole.
 The application is tested thoroughly to verify that it meets the functional and
technical specifications.
 The application is tested in an environment that is very close to the production
environment where the application will be deployed.
25
 System testing enables us to test, verify, and validate both the business
requirements as well as the application architecture.
6.5RegressionTesting
Whenever a change in a software application is made, it is quite possible that other areas
within the application have been affected by this change. Regression testing is
performed to verify that a fixed bug hasn't resulted in another functionality or business
rule violation. The intent of regression testing is to ensure that a change, such as a bug
fix should not result in another fault being uncovered in the application.
Regression testing is important because of the following reasons:
 Minimize the gaps in testing when an application with changes made has to be
tested.
 Testing the new changes to verify that the changes made did not affect any other
area of the application.
 Mitigates risks when regression testing is performed on the application.
 Test coverage is increased without compromising timelines.
 Increase speed to market the product.
6.6Acceptance Testing
This is arguably the most important type of testing, as it is conducted by the Quality
Assurance Team who will gauge whether the application meets the intended
specifications and satisfies the client’s requirement. The QA team will have a set of pre-
written scenarios and test cases that will be used to test the application.
More ideas will be shared about the application and more tests can be performed on it to
gauge its accuracy and the reasons why the project was initiated. Acceptance tests are
not only intended to point out simple spelling mistakes, cosmetic errors, or interface
26
gaps, but also to point out any bugs in the application that will result in system crashes
or major errors in the application.
By performing acceptance tests on an application, the testing team will deduce how the
application will perform in production. There are also legal and contractual requirements
for acceptance of the system.
6.6.1Alpha Testing
This test is the first stage of testing and will be performed amongst the teams (developer
and QA teams). Unit testing, integration testing and system testing when combined
together is known as alpha testing. During this phase, the following aspects will be tested
in the application:
 Spelling Mistakes
 Broken Links
 Cloudy Directions
 The Application will be tested on machines with the lowest specification to test
loading times and any latency problems.
6.6.2BetaTesting
This test is performed after alpha testing has been successfully performed. In beta
testing, a sample of the intended audience tests the application. Beta testing is also
known as pre-release testing. Beta test versions of software are ideally distributed to a
wide audience on the Web, partly to give the program a "real-world" test and partly to
provide a preview of the next release. In this phase, the audience will be testing the
following:
 Users will install, run the application and send their feedback to the project team.
 Typographical errors, confusing application flow, and even crashes.
27
 Getting the feedback, the project team can fix the problems before releasing the
software to the actual users.
 The more issues you fix that solve real user problems, the higher the quality of
your application will be.
 Having a higher-quality application when you release it to the general public will
increase customer satisfaction.
6.7Non-Functional Testing
This section is based upon testing an application from its non-functional attributes. Non-
functional testing involves testing a software from the requirements which are
nonfunctional in nature but important such as performance, security, user interface, etc.
Some of the important and commonly used non-functional testing types are discussed
below.
Performance Testing
It is mostly used to identify any bottlenecks or performance issues rather than finding
bugs in software. There are different causes that contribute in lowering the performance
of software:
 Network delay
 Client-side processing
 Database transaction processing
 Load balancing between servers
 Data rendering
Performance testing is considered as one of the important and mandatory testing type in
terms of the following aspects:
 Speed (i.e. Response Time, data rendering and accessing)
 Capacity
28
 Stability
 Scalability
Performance testing can be either qualitative or quantitative and can be divided into
different sub-types such as Load testing and Stress testing.
6.7.1 Load Testing
It is a process of testing the behavior of software by applying maximum load in terms of
software accessing and manipulating large input data. It can be done at both normal and
peak load conditions. This type of testing identifies the maximum capacity of software
and its behavior at peak time.
Most of the time, load testing is performed with the help of automated tools such as Load
Runner, App Loader, IBM Rational Performance Tester, Apache JMeter, Silk Performer,
Visual Studio Load Test, etc.
Virtual users (V Users) are defined in the automated testing tool and the script is
executed to verify the load testing for the software. The number of users can be increased
or decreased concurrently or incrementally based upon the requirements.
6.7.2 Stress Testing
Stress testing includes testing the behavior of software under abnormal conditions. For
example, it may include taking away some resources or applying a load beyond the
actual load limit.
The aim of stress testing is to test the software by applying the load to the system and
taking over the resources used by the software to identify the breaking point. This testing
can be performed by testing different scenarios such as:
 Shutdown or restart of network ports randomly
 Turning the database on or off
29
 Running different processes that consume resources such as CPU, memory,
server, etc.
6.8Usability Testing
Usability testing is a black-box technique and is used to identify any error(s) and
improvements in the software by observing the users through their usage and operation.
According to Nielsen, usability can be defined in terms of five factors, i.e. efficiency of
use, learn-ability, memory-ability, errors/safety, and satisfaction. According to him, the
usability of a product will be good and the system is usable if it possesses the above
factors.
Nigel Bevan and Macleod considered that usability is the quality requirement that can be
measured as the outcome of interactions with a computer system. This requirement can
be fulfilled and the end-user will be satisfied if the intended goals are achieved
effectively with the use of proper resources.
Molich in 2000 stated that a user-friendly system should fulfill the following five goals,
i.e., easy to Learn, easy to remember, efficient to use, satisfactory to use, and easy to
understand.
In addition to the different definitions of usability, there are some standards and quality
models and methods that define usability in the form of attributes and sub-attributes such
as ISO-9126, ISO-9241-11, ISO-13407, and IEEE std.610.12, etc.
6.9 UI vs Usability Testing
UI testing involves testing the Graphical User Interface of the Software. UI testing
ensures that the GUI functions according to the requirements and tested in terms of color,
alignment, size, and other properties.
On the other hand, usability testing ensures a good and user-friendly GUI that can be
easily handled. UI testing can be considered as a sub-part of usability testing.
30
6.9.1Security Testing
Security testing involves testing a software in order to identify any flaws and gaps from
security and vulnerability point of view. Listed below are the main aspects that security
testing should ensure:
 Confidentiality
 Integrity
 Authentication
 Availability
 Authorization
 Non-repudiation
 Software is secure against known and unknown vulnerabilities
 Software data is secure
 Software is according to all security regulations
 Input checking and validation
 SQL insertion attacks
 Injection flaws
 Session management issues
 Cross-site scripting attacks
 Buffer overflows vulnerabilities
 Directory traversal attacks
6.10Portability Testing
Portability testing includes testing software with the aim to ensure its reusability and that
it can be moved from another software as well. Following are the strategies that can be
used for portability testing:
 Transferring installed software from one computer to another.
 Building executable (.exe) to run the software on different platforms.
31
Portability testing can be considered as one of the sub-parts of system testing, as this
testing type includes overall testing of a software with respect to its usage over different
environments. Computer hardware, operating systems, and browsers are the major focus
of portability testing. Some of the pre-conditions for portability testing are as follows:
 Software should be designed and coded, keeping in mind the portability
requirements.
 Unit testing has been performed on the associated components.
 Integration testing has been performed.
 Test environment has been established.
32
Chapter 7
Documentation
Testing documentation involves the documentation of artifacts that should be developed
before or during the testing of Software.
Documentation for software testing helps in estimating the testing effort required, test
coverage, requirement tracking/tracing, etc. This section describes some of the
commonly used documented artifacts related to software testing such as:
 Test Plan
 Test Scenario
 Test Case
 Traceability Matrix
7.1TestPlan
A test plan outlines the strategy that will be used to test an application, the resources that
will be used, the test environment in which testing will be performed, and the limitations
of the testing and the schedule of testing activities. Typically the Quality Assurance
Team Lead will be responsible for writing a Test Plan.
A test plan includes the following:
 Introduction to the Test Plan document
 Assumptions while testing the application
 List of test cases included in testing the application
 List of features to be tested
 What sort of approach to use while testing the software
 List of deliverables that need to be tested
 The resources allocated for testing the application
33
 Any risks involved during the testing process
 A schedule of tasks and milestones to be achieved
7.2TestScenario
It is a one line statement that notifies what area in the application will be tested. Test
scenarios are used to ensure that all process flows are tested from end to end. A
particular area of an application can have as little as one test scenario to a few hundred
scenarios depending on the magnitude and complexity of the application.
The terms 'test scenario' and 'test cases' are used interchangeably; however a test scenario
has several steps, whereas a test case has a single step. Viewed from this perspective, test
scenarios are test cases, but they include several test cases and the sequence that they
should be executed. Apart from this, each test is dependent on the output from the
previous test.
7.3TestCase
Test cases involve a set of steps, conditions, and inputs that can be used while
performing testing tasks. The main intent of this activity is to ensure whether a software
passes or fails in terms of its functionality and other aspects. There are many types of test
cases such as functional, negative, error, logical test cases, physical test cases, UI test
cases, etc.
34
Furthermore, test cases are written to keep track of the testing coverage of a software.
Generally, there are no formal templates that can be used during test case writing.
However, the following components are always available and included in every test case:
 Test case ID
 Product module
 Product version
 Revision history
 Purpose
 Assumptions
 Pre-conditions
 Steps
 Expected outcome
 Actual outcome
 Post-conditions
Many test cases can be derived from a single test scenario. In addition, sometimes
multiple test cases are written for single software which is collectively known as test
suites.
7.4Traceability Matrix
Traceability Matrix (also known as Requirement Traceability Matrix - RTM) is a table
that is used to trace the requirements during the Software Development Life Cycle. It can
be used for forward tracing (i.e. from Requirements to Design or Coding) or backward
(i.e. from Coding to Requirements). There are many user-defined templates for RTM.
Each requirement in the RTM document is linked with its associated test case so that
testing can be done as per the mentioned requirements. Furthermore, Bug ID is also
included and linked with its associated requirements and test case. The main goals for
this matrix are:
35
 Make sure the software is developed as per the mentioned requirements.
 Helps in finding the root cause of any bug.
 Helps in tracing the developed documents during different phases of SDLC.

More Related Content

PDF
Learning selenium sample
PPTX
Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...
PPTX
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
PDF
Spi dynamik-sql-inj
PDF
Mobile test automation with Selenium, Selendroid and ios-driver
PPTX
Tech talks (Automation on Selenium Web Driver. How to begin & implement)
PPTX
Android Automation Testing with Selendroid
Learning selenium sample
Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Spi dynamik-sql-inj
Mobile test automation with Selenium, Selendroid and ios-driver
Tech talks (Automation on Selenium Web Driver. How to begin & implement)
Android Automation Testing with Selendroid

What's hot (20)

PPTX
An overview of selenium webdriver
PPTX
Selendroid in Action
PDF
Pdx Se Intro To Se
PPTX
Selenium Testing
PDF
Learn Selenium - Online Guide
PPTX
Appium Meetup #2 - Mobile Web Automation Introduction
PPTX
Selenium WebDriver - Test automation for web applications
PPTX
Android Test Automation – one year later
PDF
Building Rich Ruby on Rails with Emberjs
PDF
Introduction to Automation Testing and Selenium overiew
PPTX
Selenium presentation
PPT
Steps to write Selenium
PDF
Selenium Automation Testing Interview Questions And Answers
PPTX
#Fame case study
PDF
Reasons behind selenium automation testing popularity
DOCX
What is selenium
PPTX
Laurentiu macovei meteor. a better way of building apps
PPSX
Selenium WebDriver with Java
PPTX
Getting Started with Mobile Test Automation & Appium
PDF
How To Use Selenium Successfully (Java Edition)
An overview of selenium webdriver
Selendroid in Action
Pdx Se Intro To Se
Selenium Testing
Learn Selenium - Online Guide
Appium Meetup #2 - Mobile Web Automation Introduction
Selenium WebDriver - Test automation for web applications
Android Test Automation – one year later
Building Rich Ruby on Rails with Emberjs
Introduction to Automation Testing and Selenium overiew
Selenium presentation
Steps to write Selenium
Selenium Automation Testing Interview Questions And Answers
#Fame case study
Reasons behind selenium automation testing popularity
What is selenium
Laurentiu macovei meteor. a better way of building apps
Selenium WebDriver with Java
Getting Started with Mobile Test Automation & Appium
How To Use Selenium Successfully (Java Edition)
Ad

Viewers also liked (12)

DOCX
Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...
DOC
Shruti Sharma_Testing_Sel
DOCX
How to run your first selenium test in visual studio 2008 with c
PDF
Basics of Selenium IDE,Core, Remote Control
DOCX
Selenium WebDriver FAQ's
DOCX
Selenium Testing Project report
DOCX
Selenium interview questions
PPT
Object Oriented Programming with Java
PPT
Selenium Concepts
DOCX
Realtime selenium interview questions
PPT
Selenium ppt
PDF
Test automation using selenium - Marketing platform
Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...
Shruti Sharma_Testing_Sel
How to run your first selenium test in visual studio 2008 with c
Basics of Selenium IDE,Core, Remote Control
Selenium WebDriver FAQ's
Selenium Testing Project report
Selenium interview questions
Object Oriented Programming with Java
Selenium Concepts
Realtime selenium interview questions
Selenium ppt
Test automation using selenium - Marketing platform
Ad

Similar to Testing and Automation (20)

PPTX
Introduction to the Selenium_Session1.pptx
PDF
Selenium Testing The Complete Step-by-Step Tutorial.pdf
PPTX
Test Automation Using Selenium
PDF
Selenium Automation Testing - A Complete Guide.pdf
PDF
Selenium Automation Testing - A Complete Guide.pdf
PDF
Selenium Automation Testing - A Complete Guide
PPTX
Selenium-Automation-The-Definitive-Guide (1).pptx
PDF
Top 21 Selenium FAQs.pdf
PPTX
What is Selenium Introduction to Selenium Testing.pptx
PDF
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
PDF
An Overview of Selenium Grid and Its Benefits
PDF
Selenium Webdriver Interview Questions
PPTX
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
PPTX
Selenium Basics and Overview topics.pptx
PPTX
Selenium Basics and Overview1233444.pptx
PDF
Selenium - The Way Of Success
PDF
Top 3 selenium IDE alternatives for Chrome and Firefox
PPTX
Selenium ~ Uncommon but practical use cases
PPTX
Selenium.pptxgsjdxhasdjhckcjjkdcbdcbvdciosdc
PPT
Selenium
Introduction to the Selenium_Session1.pptx
Selenium Testing The Complete Step-by-Step Tutorial.pdf
Test Automation Using Selenium
Selenium Automation Testing - A Complete Guide.pdf
Selenium Automation Testing - A Complete Guide.pdf
Selenium Automation Testing - A Complete Guide
Selenium-Automation-The-Definitive-Guide (1).pptx
Top 21 Selenium FAQs.pdf
What is Selenium Introduction to Selenium Testing.pptx
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
An Overview of Selenium Grid and Its Benefits
Selenium Webdriver Interview Questions
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Basics and Overview topics.pptx
Selenium Basics and Overview1233444.pptx
Selenium - The Way Of Success
Top 3 selenium IDE alternatives for Chrome and Firefox
Selenium ~ Uncommon but practical use cases
Selenium.pptxgsjdxhasdjhckcjjkdcbdcbvdciosdc
Selenium

Recently uploaded (20)

PDF
composite construction of structures.pdf
PDF
PPT on Performance Review to get promotions
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
Welding lecture in detail for understanding
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
Geodesy 1.pptx...............................................
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
composite construction of structures.pdf
PPT on Performance Review to get promotions
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Welding lecture in detail for understanding
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
UNIT-1 - COAL BASED THERMAL POWER PLANTS
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Strings in CPP - Strings in C++ are sequences of characters used to store and...
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Foundation to blockchain - A guide to Blockchain Tech
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Geodesy 1.pptx...............................................
Operating System & Kernel Study Guide-1 - converted.pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
OOP with Java - Java Introduction (Basics)
Mitigating Risks through Effective Management for Enhancing Organizational Pe...

Testing and Automation

  • 1. 1 List of Contents Abstract................................................................................................................................1 Chapter 1 Introducing.......................................................................................................3 1.1 selenium........................................................................................................................3 1.2 Brief History of Selenium Project…..........................................................................4-5 1.3 Selenium’s tool suite…..............................................................................................6-7 Chapter 2 Testing Overview.............................................................................................8 2.2 What is testing? ….........................................................................................................9 2.3 Who does testing? ….....................................................................................................9 2.4Test Automation should beused wherever possible to Reduce Time…......................................10 2.5 When testing is doing…...............................................................................................11 Chapter 3 Difference........................................................................................................12 3.1 Difference between Testing and Debugging................................................................12 Chapter 4 Types of Testing.............................................................................................13 4.1 Testing Types...............................................................................................................13 4.2 Manual Testing............................................................................................................14 4.3 Automation Testing.....................................................................................................15 Chapter 5 Method............................................................................................................16 5.1 Testing Methods ..........................................................................................................16 5.2 Black Box Testing........................................................................................................16 5.3 White Box Testing.......................................................................................................17 5.4 Grey Box Testing….....................................................................................................18 5.5 Comparison of Testing method..............................................................................19-20 Chapter 6 Level................................................................................................................21 6.1 Levels of Testing..........................................................................................................21 6.2 Functional Testing.......................................................................................................22 6.3 Unit Testing.................................................................................................................23 6.4 Integration Testing.......................................................................................................24 6.5 System Testing.............................................................................................................25 6.6 Regression Testing…...................................................................................................25
  • 2. 2 6.6 Acceptance Testing......................................................................................................26 6.7 Non-Functional Testing...............................................................................................26 6.8 Performance Testing....................................................................................................27 6.9 Usability Testing..........................................................................................................28 6.10 Security Testing…................................................................................................29-30 Chapter 7 Documentation...............................................................................................31 7.1 Testing Documentation...........................................................................................31-34 Chapter 8 Testing code and screenshort.......................................................................35 8.1 Testing short Screen...............................................................................................35-37 8.2 Coding…................................................................................................................38-40 Chapter 9 Reference........................................................................................................41
  • 3. 3 Chapter 1 1.1 Introducing selenium Selenium is a set of different software tools each with a different approach to supporting test automation. Most Selenium QA Engineers focus on the one or two tools that most meet the needs of their project, however learning all the tools will give you many different options for approaching different test automation problems. The entire suite of tools results in a rich set of testing functions specifically geared to the needs of testing of web applications of all types. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior. One of Selenium’s key features is the support for executing one’s tests on multiple browser platforms. Selenium WebDriver fits in the same role as RC did, and has incorporated the original 1.x bindings. It refers to both the language bindings and the implementations of the individual browser controlling code. This is commonly referred to as just "WebDriver" or sometimes as Selenium 2. Selenium 1.0 + WebDriver = Selenium 2.0  WebDriver is designed in a simpler and more concise programming interface along with addressing some limitations in the Selenium-RC API.  WebDriver is a compact Object Oriented API when compared to Selenium1.0  WebDriver overcomes the limitation of Selenium RC's Single Host origin policy Testing and Automation Many, perhaps most, software applications today are written as web-based applications to be run in an Internet browser. The effectiveness of testing these applications varies widely among companies and organizations. In an era of highly interactive and responsive software processes where many organizations are using some form of Agile methodology, test automation is frequently becoming a requirement for software projects. Test automation is often the answer. Test automation means using a
  • 4. 4 software tool to run repeatable tests against the application to be tested. For regression testing this provides that responsiveness. There are many advantages to test automation. Most are related to the repeatability of the tests and the speed at which the tests can be executed. There are a number of commercial and open source tools available for assisting with the development of test automation. Selenium is possibly the most widely-used open source solution. This user’s guide will assist both new and experienced Selenium users in learning effective techniques in building test automation for web applications. This introduces Selenium, teaches its features, and presents commonly used best practices accumulated from the Selenium community. Many examples are provided. Also, technical information on the internal structure of Selenium and recommended uses of Selenium are provided. Test automation has specific advantages for improving the long-term efficiency of a software team’s testing processes. Test automation supports:
  • 5. 5 1.2 Brief History of Selenium Project Selenium first came to life in 2004 when Jason Huggins was testing an internal application at Thought Works. Being a smart guy, he realized there were better uses of his time than manually stepping through the same tests with every change he made. He developed a JavaScript library that could drive interactions with the page, allowing him to automatically rerun tests against multiple browsers. That library eventually became Selenium Core, which underlies all the functionality of Selenium Remote Control (RC) and Selenium IDE. Selenium RC was ground-breaking because no other product allowed you to control a browser from a language of your choice. While Selenium was a tremendous tool, it wasn’t without its drawbacks. Because of its JavaScript based automation engine and the security limitations browsers apply to JavaScript, different things became impossible to do. To make things worse, Webapps became more and more powerful over time, using all sorts of special features new browsers provide and making these restrictions more and more painful. In 2006 a plucky engineer at Google named Simon Stewart started work on a project he called WebDriver. Google had long been a heavy user of Selenium, but testers had to work around the limitations of the product. Simon wanted a testing tool that spoke directly to the browser using the ‘native’ method for the browser and operating system, thus avoiding the restrictions of a sandboxed JavaScript environment. The WebDriver project began with the aim to solve the Selenium’ pain-points. Jump to 2008. The Beijing Olympics mark China’s arrival as a global power, massive mortgage default in the United States triggers the worst international recession since the Great Depression, The Dark Knight is viewed by every human (twice), still reeling from the untimely loss of Heath Ledger. But the most important story of that year was the merging of Selenium and WebDriver. Selenium had massive community and commercial support, but WebDriver was clearly the tool of the future. The joining of the two tools provided a common set of features for all users and brought some of the brightest minds in test automation under one roof. Perhaps the best explanation for why WebDriver and
  • 6. 6 Selenium are merging was detailed by Simon Stewart, the creator of WebDriver, in a joint email to the WebDriver and Selenium community on August 6, 2009. “Why are the projects merging? Partly because WebDriver addresses some shortcomings in selenium (by being able to bypass the JS sandbox, for example. And we’ve got a gorgeous API), partly because selenium addresses some shortcomings in WebDriver (such as supporting a broader range of browsers) and partly because the main selenium contributors and I felt that it was the best way to offer users the best possible framework”.
  • 7. 7 1.3 Selenium’s Tool Suite 1.3.1 Selenium 2(aka Selenium webDriver): Selenium 2 is the future direction of the project and the newest addition to the Selenium toolkit. This brand new automation tool provides all sorts of awesome features, including a more cohesive and objects oriented API as well as an answer to the limitations of the old implementation. As you can read in Brief History of The Selenium Project, both the Selenium and WebDriver developers agreed that both tools have advantages and that merging the two projects would make a much more robust automation tool. Selenium 2.0 is the product of that effort. It supports the WebDriver API and underlying technology, along with the Selenium 1 technology underneath the WebDriver API for maximum flexibility in porting your tests. In addition, Selenium 2 still runs Selenium 1’s Selenium RC interface for backwards compatibility. 1.3.2 Selenium 1(aka selenium RC or Remote controller): As you can read in Brief History of The Selenium Project, Selenium RC was the main Selenium project for a long time, before the WebDriver/Selenium merge brought up Selenium 2, the newest and more powerful tool. Now Selenium 1 is deprecated and is not actively supported (mostly in maintenance mode). 1.3.3 Selenium IDE: Selenium IDE (Integrated Development Environment) is a prototyping tool for building test scripts. It is a Firefox plug-in and provides an easy-to-use interface for developing automated tests. Selenium IDE has a recording feature, which records user actions as they are performed and then exports them as a reusable script in one of many programming languages that can be later executed.
  • 8. 8 Note Even though Selenium IDE has a “Save” feature that allows users to keep the tests in a table-based format for later import and execution, it is not designed to run your test passes nor is it designed to build all the automated tests you will need. Specifically, Selenium IDE doesn’t provide iteration or conditional statements for test scripts. At the time of writing there is no plan to add such thing. The reasons are partly technical and partly based on the Selenium developers encouraging best practices in test automation which always requires some amount of programming. Selenium IDE is simply intended as a rapid prototyping tool. The Selenium developers recommend for serious, robust test automation either Selenium 2 or Selenium 1 to be used with one of the many supported programming languages.
  • 9. 9 Chapter 2 Testing Overview 2.1Who does Testing? It depends on the process and the associated stakeholders of the project(s). In the IT industry, large companies have a team with responsibilities to evaluate the developed software in context of the given requirements. Moreover, developers also conduct testing which is called Unit Testing. In most cases, the following professionals are involved in testing a system within their respective capacities:  Software Tester  Software Developer  Project Lead/Manager  End User Different companies have different designations for people who test the software on the basis of their experience and knowledge such as Software Tester, Software Quality Assurance Engineer, QA Analyst, etc. It is not possible to test the software at any time during its cycle. The next two sections state when testing should be started and when to end it during the SDLC. 2.2When toStart Testing? An early start to testing reduces the cost and time to rework and produce error-free software that is delivered to the client. However in Software Development Life Cycle (SDLC), testing can be started from the Requirements Gathering phase and continued till the deployment of the software. It also depends on the development model that is being used. For example, in the Waterfall model, formal testing is conducted in the testing phase; but in the incremental model, testing is performed at the end of every increment/iteration and the whole application is tested at the end. Testing is done in different forms at every phase of SDLC:
  • 10. 10  During the requirement gathering phase, the analysis and verification of requirements are also considered as testing.  Reviewing the design in the design phase with the intent to improve the design is also considered as testing.  Testing performed by a developer on completion of the code is also categorized as testing. 2.3When toStopTesting? It is difficult to determine when to stop testing, as testing is a never-ending process and no one can claim that a software is 100% tested. The following aspects are to be considered for stopping the testing process:  Testing Deadlines  Completion of test case execution  Completion of functional and code coverage to a certain point  Bug rate falls below a certain level and no high-priority bugs are identified  Management decision 2.3.1Testingis Too Expensive Reality: There is a saying, pay less for testing during software development or pay more for maintenance or correction later. Early testing saves both time and cost in many aspects, however reducing the cost without testing may result in improper design of a software application rendering the product useless. 2.3.2Testing is Time-Consuming Reality: During the SDLC phases, testing is never a time-consuming process. However diagnosing and fixing the errors identified during proper testing is a time-consuming but productive activity.
  • 11. 11 2.3.3Only Fully DevelopedProducts are Tested Reality: No doubt, testing depends on the source code but reviewing requirements and developing test cases is independent from the developed code. However iterative or incremental approach as a development life cycle model may reduce the dependency of testing on the fully developed software. 2.3.4Complete Testingis Possible Reality: It becomes an issue when a client or tester thinks that complete testing is possible. It is possible that all paths have been tested by the team but occurrence of complete testing is never possible. There might be some scenarios that are never executed by the test team or the client during the software development life cycle and may be executed once the project has been deployed. 2.4A TestedSoftware is Bug-Free Reality: This is a very common myth that the clients, project managers, and the management team believes in. No one can claim with absolute certainty that a software application is 100% bug-free even if a tester with superb testing skills has tested the application. 2.4.1MissedDefects are due toTesters Reality: It is not a correct approach to blame testers for bugs that remain in the application even after testing has been performed. This myth relates to Time, Cost, and Requirements changing Constraints. However the test strategy may also result in bugs being missed by the testing team. 2.4.2Testers are Responsible forQuality ofProduct Reality: It is a very common misinterpretation that only testers or the testing team should be responsible for product quality. Testers’ responsibilities include the identification of bugs to the stakeholders and then it is their decision whether they will fix the bug or release the software. Releasing the software at the time puts more pressure on the testers, as they will be blamed for any error.
  • 12. 12 2.4.3TestAutomation should be usedwherever possible toReduce Time Reality: Yes, it is true that Test Automation reduces the testing time, but it is not possible to start test automation at any time during software development. Test automaton should be started when the software has been manually tested and is stable to some extent. Moreover, test automation can never be used if requirements keep changing. 2.5Anyone can TestaSoftware Application Reality: People outside the IT industry think and even believe that anyone can test software and testing is not a creative job. However testers know very well that this is a myth. Thinking alternative scenarios, try to crash software with the intent to explore potential bugs is not possible for the person who developed it. 2.5.1A Tester's onlyTaskis toFind Bugs Reality: Finding bugs in software is the task of the testers, but at the same time, they are domain experts of the particular software. Developers are only responsible for the specific component or area that is assigned to them but testers understand the overall workings of the software, what the dependencies are, and the impacts of one module on another module.
  • 13. 13 Chapter 3 Difference 3.1Testing and Debugging Testing: It involves identifying bug/error/defect in software without correcting it. Normally professionals with a quality assurance background are involved in bugs identification. Testing is performed in the testing phase. Debugging: It involves identifying, isolating, and fixing the problems/bugs. Developers who code the software conduct debugging upon encountering an error in the code. Debugging is a part of White Box Testing or Unit Testing. Debugging can be performed in the development phase while conducting Unit Testing or in phases while fixing the reported bugs.
  • 14. 14 Chapter4 Type ofTesting 4.1Manual Testing Manual testing includes testing a software manually, i.e., without using any automated tool or any script. In this type, the tester takes over the role of an end-user and tests the software to identify any unexpected behavior or bug. There are different stages for manual testing such as unit testing, integration testing, system testing, and user acceptance testing. Testers use test plans, test cases, or test scenarios to test software to ensure the completeness of testing. Manual testing also includes exploratory testing, as testers explore the software to identify errors in it. 4.2Automation Testing Automation testing, which is also known as Test Automation, is when the tester writes scripts and uses another software to test the product. This process involves automation of a manual process. Automation Testing is used to re-run the test scenarios that were performed manually, quickly, and repeatedly. Apart from regression testing, automation testing is also used to test the application from load, performance, and stress point of view. It increases the test coverage, improves accuracy, and saves time and money in comparison to manual testing.
  • 15. 15 4.3What is Automate? It is not possible to automate everything in software. The areas at which a user can make transactions such as the login form or registration forms, any area where large number of users can access the software simultaneously should be automated. Furthermore, all GUI items, connections with databases, field validations, etc. can be efficiently tested by automating the manual process. 4.3.1When toAutomate? Test Automation should be used by considering the following aspects of a software:  Large and critical projects  Projects that require testing the same areas frequently  Requirements not changing frequently  Accessing the application for load and performance with many virtual users  Stable software with respect to manual testing  Availability of time 4.3.2How toAutomate? Automation is done by using a supportive computer language like VB scripting and an automated software application. There are many tools available that can be used to write automation scripts. Before mentioning the tools, let us identify the process that can be used to automate the testing process:  Identifying areas within a software for automation  Selection of appropriate tool for test automation  Writing test scripts  Development of test suits  Execution of scripts  Create result reports
  • 16. 16  Identify any potential bug or performance issues
  • 17. 17 Chapter 5 Method of Testing There are different methods that can be used for software testing. This chapter briefly describes the methods available. 5.1Black-BoxTesting The technique of testing without having any knowledge of the interior workings of the application is called black-box testing. The tester is oblivious to the system architecture and does not have access to the source code. Typically, while performing a black-box test, a tester will interact with the system's user interface by providing inputs and examining outputs without knowing how and where the inputs are worked upon. The following table lists the advantages and disadvantages of black-box testing. Advantages Disadvantages  Well suited and efficient for large code segments.  Code access is not required.  Clearly separates user's perspective from the developer's perspective through visibly defined roles.  Large numbers of moderately skilled testers can test the application with no knowledge of implementation, programming language, or operating systems.  Limited coverage, since only a selected number of test scenarios is actually performed.  Inefficient testing, due to the fact that the tester only has limited knowledge about an application.  Blind coverage, since the tester cannot target specific code segments or error-prone areas.  The test cases are difficult to design.
  • 18. 18 5.2White-Box Testing White-box testing is the detailed investigation of internal logic and structure of the code. White-box testing is also called glass testing or open-box testing. In order to perform white-box testing on an application, a tester needs to know the internal workings of the code. The tester needs to have a look inside the source code and find out which unit/chunk of the code is behaving inappropriately. The following table lists the advantages and disadvantages of white-box testing. Advantages Disadvantages  As the tester has knowledge of the source code, it becomes very easy to find out which type of data can help in testing the application effectively.  It helps in optimizing the code.  Extra lines of code can be removed which can bring in hidden defects.  Due to the tester's knowledge about the code, maximum coverage is attained during test scenario writing.  Due to the fact that a skilled tester is needed to perform white-box testing, the costs are increased.  Sometimes it is impossible to look into every nook and corner to find out hidden errors that may create problems, as many paths will go untested.  It is difficult to maintain white-box testing, as it requires specialized tools like code analyzers and debugging tools.
  • 19. 19 5.3Grey-Box Testing Grey-box testing is a technique to test the application with having a limited knowledge of the internal workings of an application. In software testing, the phrase the more you know, the better carries a lot of weight while testing an application. Mastering the domain of a system always gives the tester an edge over someone with limited domain knowledge. Unlike black-box testing, where the tester only tests the application's user interface; in grey-box testing, the tester has access to design documents and the database. Having this knowledge, a tester can prepare better test data and test scenarios while making a test plan. Advantages Disadvantages  Offers combined benefits of black- box and white-box testing wherever possible.  Grey box testers don't rely on the source code; instead they rely on interface definition and functional specifications.  Based on the limited information available, a grey-box tester can design excellent test scenarios especially around communication protocols and data type handling.  The test is done from the point of view of the user and not the designer.  Since the access to source code is not available, the ability to go over the code and test coverage is limited.  The tests can be redundant if the software designer has already run a test case.  Testing every possible input stream is unrealistic because it would take an unreasonable amount of time; therefore, many program paths will go untested.
  • 20. 20 5.4A Comparison ofTesting Methods The following table lists the points that differentiate black-box testing, grey-box testing, and white-box testing. Black-Box Testing Grey-Box Testing White-Box Testing The internal workings of an application need not be known. The tester has limited knowledge of the internal workings of the application. Tester has full knowledge of the internal workings of the application. Also known as closed-box testing, data-driven testing, or functional testing. Also known as translucent testing, as the tester has limited knowledge of the insides of the application. Also known as clear-box testing, structural testing, or code-based testing. Performed by end-users and also by testers and developers. Performed by end-users and also by testers and developers. Normally done by testers and developers. Testing is based on external expectations - Internal behavior of the application is unknown. Testing is done on the basis of high-level database diagrams and data flow diagrams. Internal workings are fully known and the tester can design test data accordingly. It is exhaustive and the least time-consuming. Partly time-consuming and exhaustive. The most exhaustive and time-consuming type of testing.
  • 21. 21 Not suited for algorithm testing. Not suited for algorithm testing. Suited for algorithm testing. This can only be done by trial-and-error method. Data domains and internal boundaries can be tested, if known. Data domains and internal boundaries can be better tested.
  • 22. 22 Chapter 6 Testing Level There are different levels during the process of testing. In this chapter, a brief description is provided about these levels. Levels of testing include different methodologies that can be used while conducting software testing. The main levels of software testing are:  Functional Testing  Non-functional Testing 6.1Functional Testing This is a type of black-box testing that is based on the specifications of the software that is to be tested. The application is tested by providing input and then the results are examined that need to conform to the functionality it was intended for. Functional testing of a software is conducted on a complete, integrated system to evaluate the system's compliance with its specified requirements. There are five steps that are involved while testing an application for functionality. Steps Description I The determination of the functionality that the intended application is meant to perform. II The creation of test data based on the specifications of the application. III The output based on the test data and the specifications of the application. IV The writing of test scenarios and the execution of test cases.
  • 23. 23 V The comparison of actual and expected results based on the executed test cases. An effective testing practice will see the above steps applied to the testing policies of every organization and hence it will make sure that the organization maintains the strictest of standards when it comes to software quality. 6.2Unit Testing This type of testing is performed by developers before the setup is handed over to the testing team to formally execute the test cases. Unit testing is performed by the respective developers on the individual units of source code assigned areas. The developers use test data that is different from the test data of the quality assurance team. The goal of unit testing is to isolate each part of the program and show that individual parts are correct in terms of requirements and functionality. 6.2.1 Limitations of Unit Testing Testing cannot catch each and every bug in an application. It is impossible to evaluate every execution path in every software application. The same is the case with unit testing. There is a limit to the number of scenarios and test data that a developer can use to verify a source code. After having exhausted all the options, there is no choice but to stop unit testing and merge the code segment with other units. 6.3Integration Testing Integration testing is defined as the testing of combined parts of an application to determine if they function correctly. Integration testing can be done in two ways: Bottom-up integration testing and Top-down integration testing.
  • 24. 24 S.N. Integration Testing Method 1 Bottom-up integration This testing begins with unit testing, followed by tests of progressively higher-level combinations of units called modules or builds. 2 Top-down integration In this testing, the highest-level modules are tested first and progressively, lower- level modules are tested thereafter. In a comprehensive software development environment, bottom-up testing is usually done first, followed by top-down testing. The process concludes with multiple tests of the complete application, preferably in scenarios designed to mimic actual situations. 6.4SystemTesting System testing tests the system as a whole. Once all the components are integrated, the application as a whole is tested rigorously to see that it meets the specified Quality Standards. This type of testing is performed by a specialized testing team. System testing is important because of the following reasons:  System testing is the first step in the Software Development Life Cycle, where the application is tested as a whole.  The application is tested thoroughly to verify that it meets the functional and technical specifications.  The application is tested in an environment that is very close to the production environment where the application will be deployed.
  • 25. 25  System testing enables us to test, verify, and validate both the business requirements as well as the application architecture. 6.5RegressionTesting Whenever a change in a software application is made, it is quite possible that other areas within the application have been affected by this change. Regression testing is performed to verify that a fixed bug hasn't resulted in another functionality or business rule violation. The intent of regression testing is to ensure that a change, such as a bug fix should not result in another fault being uncovered in the application. Regression testing is important because of the following reasons:  Minimize the gaps in testing when an application with changes made has to be tested.  Testing the new changes to verify that the changes made did not affect any other area of the application.  Mitigates risks when regression testing is performed on the application.  Test coverage is increased without compromising timelines.  Increase speed to market the product. 6.6Acceptance Testing This is arguably the most important type of testing, as it is conducted by the Quality Assurance Team who will gauge whether the application meets the intended specifications and satisfies the client’s requirement. The QA team will have a set of pre- written scenarios and test cases that will be used to test the application. More ideas will be shared about the application and more tests can be performed on it to gauge its accuracy and the reasons why the project was initiated. Acceptance tests are not only intended to point out simple spelling mistakes, cosmetic errors, or interface
  • 26. 26 gaps, but also to point out any bugs in the application that will result in system crashes or major errors in the application. By performing acceptance tests on an application, the testing team will deduce how the application will perform in production. There are also legal and contractual requirements for acceptance of the system. 6.6.1Alpha Testing This test is the first stage of testing and will be performed amongst the teams (developer and QA teams). Unit testing, integration testing and system testing when combined together is known as alpha testing. During this phase, the following aspects will be tested in the application:  Spelling Mistakes  Broken Links  Cloudy Directions  The Application will be tested on machines with the lowest specification to test loading times and any latency problems. 6.6.2BetaTesting This test is performed after alpha testing has been successfully performed. In beta testing, a sample of the intended audience tests the application. Beta testing is also known as pre-release testing. Beta test versions of software are ideally distributed to a wide audience on the Web, partly to give the program a "real-world" test and partly to provide a preview of the next release. In this phase, the audience will be testing the following:  Users will install, run the application and send their feedback to the project team.  Typographical errors, confusing application flow, and even crashes.
  • 27. 27  Getting the feedback, the project team can fix the problems before releasing the software to the actual users.  The more issues you fix that solve real user problems, the higher the quality of your application will be.  Having a higher-quality application when you release it to the general public will increase customer satisfaction. 6.7Non-Functional Testing This section is based upon testing an application from its non-functional attributes. Non- functional testing involves testing a software from the requirements which are nonfunctional in nature but important such as performance, security, user interface, etc. Some of the important and commonly used non-functional testing types are discussed below. Performance Testing It is mostly used to identify any bottlenecks or performance issues rather than finding bugs in software. There are different causes that contribute in lowering the performance of software:  Network delay  Client-side processing  Database transaction processing  Load balancing between servers  Data rendering Performance testing is considered as one of the important and mandatory testing type in terms of the following aspects:  Speed (i.e. Response Time, data rendering and accessing)  Capacity
  • 28. 28  Stability  Scalability Performance testing can be either qualitative or quantitative and can be divided into different sub-types such as Load testing and Stress testing. 6.7.1 Load Testing It is a process of testing the behavior of software by applying maximum load in terms of software accessing and manipulating large input data. It can be done at both normal and peak load conditions. This type of testing identifies the maximum capacity of software and its behavior at peak time. Most of the time, load testing is performed with the help of automated tools such as Load Runner, App Loader, IBM Rational Performance Tester, Apache JMeter, Silk Performer, Visual Studio Load Test, etc. Virtual users (V Users) are defined in the automated testing tool and the script is executed to verify the load testing for the software. The number of users can be increased or decreased concurrently or incrementally based upon the requirements. 6.7.2 Stress Testing Stress testing includes testing the behavior of software under abnormal conditions. For example, it may include taking away some resources or applying a load beyond the actual load limit. The aim of stress testing is to test the software by applying the load to the system and taking over the resources used by the software to identify the breaking point. This testing can be performed by testing different scenarios such as:  Shutdown or restart of network ports randomly  Turning the database on or off
  • 29. 29  Running different processes that consume resources such as CPU, memory, server, etc. 6.8Usability Testing Usability testing is a black-box technique and is used to identify any error(s) and improvements in the software by observing the users through their usage and operation. According to Nielsen, usability can be defined in terms of five factors, i.e. efficiency of use, learn-ability, memory-ability, errors/safety, and satisfaction. According to him, the usability of a product will be good and the system is usable if it possesses the above factors. Nigel Bevan and Macleod considered that usability is the quality requirement that can be measured as the outcome of interactions with a computer system. This requirement can be fulfilled and the end-user will be satisfied if the intended goals are achieved effectively with the use of proper resources. Molich in 2000 stated that a user-friendly system should fulfill the following five goals, i.e., easy to Learn, easy to remember, efficient to use, satisfactory to use, and easy to understand. In addition to the different definitions of usability, there are some standards and quality models and methods that define usability in the form of attributes and sub-attributes such as ISO-9126, ISO-9241-11, ISO-13407, and IEEE std.610.12, etc. 6.9 UI vs Usability Testing UI testing involves testing the Graphical User Interface of the Software. UI testing ensures that the GUI functions according to the requirements and tested in terms of color, alignment, size, and other properties. On the other hand, usability testing ensures a good and user-friendly GUI that can be easily handled. UI testing can be considered as a sub-part of usability testing.
  • 30. 30 6.9.1Security Testing Security testing involves testing a software in order to identify any flaws and gaps from security and vulnerability point of view. Listed below are the main aspects that security testing should ensure:  Confidentiality  Integrity  Authentication  Availability  Authorization  Non-repudiation  Software is secure against known and unknown vulnerabilities  Software data is secure  Software is according to all security regulations  Input checking and validation  SQL insertion attacks  Injection flaws  Session management issues  Cross-site scripting attacks  Buffer overflows vulnerabilities  Directory traversal attacks 6.10Portability Testing Portability testing includes testing software with the aim to ensure its reusability and that it can be moved from another software as well. Following are the strategies that can be used for portability testing:  Transferring installed software from one computer to another.  Building executable (.exe) to run the software on different platforms.
  • 31. 31 Portability testing can be considered as one of the sub-parts of system testing, as this testing type includes overall testing of a software with respect to its usage over different environments. Computer hardware, operating systems, and browsers are the major focus of portability testing. Some of the pre-conditions for portability testing are as follows:  Software should be designed and coded, keeping in mind the portability requirements.  Unit testing has been performed on the associated components.  Integration testing has been performed.  Test environment has been established.
  • 32. 32 Chapter 7 Documentation Testing documentation involves the documentation of artifacts that should be developed before or during the testing of Software. Documentation for software testing helps in estimating the testing effort required, test coverage, requirement tracking/tracing, etc. This section describes some of the commonly used documented artifacts related to software testing such as:  Test Plan  Test Scenario  Test Case  Traceability Matrix 7.1TestPlan A test plan outlines the strategy that will be used to test an application, the resources that will be used, the test environment in which testing will be performed, and the limitations of the testing and the schedule of testing activities. Typically the Quality Assurance Team Lead will be responsible for writing a Test Plan. A test plan includes the following:  Introduction to the Test Plan document  Assumptions while testing the application  List of test cases included in testing the application  List of features to be tested  What sort of approach to use while testing the software  List of deliverables that need to be tested  The resources allocated for testing the application
  • 33. 33  Any risks involved during the testing process  A schedule of tasks and milestones to be achieved 7.2TestScenario It is a one line statement that notifies what area in the application will be tested. Test scenarios are used to ensure that all process flows are tested from end to end. A particular area of an application can have as little as one test scenario to a few hundred scenarios depending on the magnitude and complexity of the application. The terms 'test scenario' and 'test cases' are used interchangeably; however a test scenario has several steps, whereas a test case has a single step. Viewed from this perspective, test scenarios are test cases, but they include several test cases and the sequence that they should be executed. Apart from this, each test is dependent on the output from the previous test. 7.3TestCase Test cases involve a set of steps, conditions, and inputs that can be used while performing testing tasks. The main intent of this activity is to ensure whether a software passes or fails in terms of its functionality and other aspects. There are many types of test cases such as functional, negative, error, logical test cases, physical test cases, UI test cases, etc.
  • 34. 34 Furthermore, test cases are written to keep track of the testing coverage of a software. Generally, there are no formal templates that can be used during test case writing. However, the following components are always available and included in every test case:  Test case ID  Product module  Product version  Revision history  Purpose  Assumptions  Pre-conditions  Steps  Expected outcome  Actual outcome  Post-conditions Many test cases can be derived from a single test scenario. In addition, sometimes multiple test cases are written for single software which is collectively known as test suites. 7.4Traceability Matrix Traceability Matrix (also known as Requirement Traceability Matrix - RTM) is a table that is used to trace the requirements during the Software Development Life Cycle. It can be used for forward tracing (i.e. from Requirements to Design or Coding) or backward (i.e. from Coding to Requirements). There are many user-defined templates for RTM. Each requirement in the RTM document is linked with its associated test case so that testing can be done as per the mentioned requirements. Furthermore, Bug ID is also included and linked with its associated requirements and test case. The main goals for this matrix are:
  • 35. 35  Make sure the software is developed as per the mentioned requirements.  Helps in finding the root cause of any bug.  Helps in tracing the developed documents during different phases of SDLC.