UNIT 4
UNIT 4
UNIT IV
ADVANCED TESTING CONCEPTS
Performance Testing: Load Testing, Stress Testing, Volume Testing, Fail-Over Testing,
Recovery Testing, Configuration Testing, Compatibility Testing, Usability Testing, Testing
the Documentation, Security testing, Testing in the Agile Environment, Testing Web and
Mobile Applications.
4.1 PERFORMANCE TESTING
Performance Testing is a type of software testing that ensures software applications
perform properly under their expected workload. It is a testing technique carried out to
determine system performance in terms of sensitivity, reactivity, and stability under a
particular workload.
Performance Testing is the process of analysing the quality and capability of a
product. It is a testing method performed to determine the system’s performance in terms of
speed, reliability, and stability under varying workloads. Performance testing is also known
as Perf Testing.
Load Testing Tools: Apache Jmeter, WebLoad, NeoLoad, LoadNinja, HP Performance, Tester,
LoadUI Pro, LoadView.
1. Planning the stress test: This step involves gathering the system data, analyzing the
system, and defining the stress test goals.
2. Create Automation Scripts: This step involves creating the stress testing automation
scripts and generating the test data for the stress test scenarios.
3. Script Execution: This step involves running the stress test automation scripts and
storing the stress test results.
4. Result Analysis: This phase involves analyzing stress test results and identifying the
bottlenecks.
5. Tweaking and Optimization: This step involves fine-tuning the system and
optimizing the code with the goal meet the desired benchmarks.
10
11
1. Consider the factors: Before performing failover testing like budget, time, team,
technology, etc.
2. Analysis on failover reasons and design solutions: Determine probable failure
situations that the system might experience. Examine the causes of failover, including
software bugs, hardware malfunctions, network problems, etc. It provides fixes for
any flaws or vulnerabilities found in the failover procedure.
3. Testing failover scenarios: It develops extensive test cases to replicate various failover
scenarios. This covers both unplanned failovers (system or component failures) and
scheduled failovers (maintenance). Test cases ought to address many facets of
failover, such as load balancing, user impact, network rerouting, and data
synchronization.
4. Executing the test plan: To reduce the impact on production systems, carry out the
failover test plan in a controlled setting. Keep an eye on how the system behaves
during failover to make sure it satisfies the recovery point and recovery time
objectives (RPO and RTO, respectively).
5. Detailed report on failover: Keep a record of the failover testing findings, including
any problems you ran across, how long it took to failover and how it affected
customers or services. Assess problems according to their severity and offer
suggestions for improvements.
6. Necessary actions based on the report: Distribute the report on the failover test to all
pertinent parties, such as project managers, developers, and system administrators.
Determine what needs to be done and prioritize it based on the report’s conclusions.
This might involve fixing found flaws in the system, updating failover setups or
improving the documentation.
12
13
14
15
16
The various configurations are Win XP, Win 7 32/64 bit, Win 8 32/64 bit, Win 10, etc.
1. Database Configuration: Oracle, DB2, MySQL, MSSQL Server, Sybase etc.
2. Browser Configuration: IE 8, IE 9, FF 16.0, Chrome, Microsoft Edge etc.
17
18
19
Rerun the Tests Until the Results Satisfy Your Team: It’s not uncommon for
configuration testing to run the entire course of a project. Initially a few configurations might
be tried, then a full test pass, then smaller and smaller sets to confirm bug fixes. Eventually
you will get to a point where there are no known bugs or to where the bugs that still exist are
in uncommon or unlikely test configurations. At that point, you can call your configuration
testing complete.
20
2. Hardware:
Checking compatibility with a particular size of
• RAM
• ROM
• Hard Disk
• Memory Cards
• Processor Graphics Card
3. Smartphones:
Checking compatibility with different mobile platforms like android, iOS etc.
4. Network:
Checking compatibility with different:
• Bandwidth
• Operating speed
• Capacity
Along with this there are other types of compatibility testing are also performed such as
browser compatibility to check software compatibility with different browsers like Google
Chrome, Internet Explorer etc. device compatibility, version of the software and others.
21
22
1. Prepare your product or design to test: The first phase of usability testing is
choosing a product and then making it ready for usability testing. For usability testing,
more functions and operations are required than this phase provided that type of
requirement. Hence, this is one of the most significant phases in usability testing.
2. Find your participants: The second phase of usability testing is finding an employee
who is helping you with performing usability testing. Generally, the number of
participants that you need is based on several case studies. Mostly, five participants
can find almost as many usability problems as you’d find using many more test
participants.
3. Write a test plan: This is the third phase of usability testing. The plan is one of the
first steps in each round of usability testing is to develop a plan for the test. The main
purpose of the plan is to document what you are going to do, how you are going to
conduct the test, what metrics you are going to find, the number of participants you
are going to test, and what scenarios you will use.
4. Take on the role of the moderator: This is the fourth phase of usability testing and
23
24
25
26
27
• Installation and setup instructions. Sometimes this information is printed directly on the
discs, but it also can be included on the CD sleeve or as a CD jewel box insert. If it’s
complex software, there could be an entire installation manual.
• User’s manual. The usefulness and flexibility of online manuals has made printed manuals
much less common than they once were. Most software now comes with a small, concise
“getting started”–type manual with the detailed information moved to online format. The
online manuals can be distributed on the software’s media, on a website, or a combination
of both.
• Online help. Online help often gets intertwined with the user’s manual, sometimes even
replacing it. Online help is indexed and searchable, making it much easier for users to find
the information they’re looking for. Many online help systems allow natural language
queries so users can type Tell me how to copy text from one program to another and receive
an appropriate response.
• Tutorials, wizards, and CBT (Computer Based Training). These tools blend programming
code and written documentation. They’re often a mixture of both content and high-level,
macro-like programming and are often tied in with the online help system. A user can ask a
question and the software then guides him through the steps to complete the task.
• Samples, examples, and templates. An example of these would be a word processor with
forms or samples that a user can simply fill in to quickly create professional-looking results.
A compiler could have snippets of code that demonstrate how to use certain aspects of the
language.
• Error messages.
28
29
Availability: In this, the data must be retained by an official person, and they also guarantee
that the data and statement services will be ready to use whenever we need it.
Integrity: In this, we will secure those data which have been changed by the unofficial
person. The primary objective of integrity is to permit the receiver to control the data that is
given by the system.
The integrity systems regularly use some of the similar fundamental approaches as
confidentiality structures. Still, they generally include the data for the communication to
create the source of an algorithmic check rather than encrypting all of the communication.
And also verify that correct data is conveyed from one application to another.
Authorization: It is the process of defining that a client is permitted to perform an action and
also receive the services. The example of authorization is Access control.
Confidentiality: It is a security process that protracts the leak of the data from the outsider's
because it is the only way where we can make sure the security of our data.
Authentication: The authentication process comprises confirming the individuality of a
person, tracing the source of a product that is necessary to allow access to the private
information or the system.
30
System software security: In this, we will evaluate the vulnerabilities of the application
based on different software such as Operating system, Database system, etc.
Network security: In this, we will check the weakness of the network structure, such as
policies and resources.
Server-side application security: We will do the server-side application security to ensure
that the server encryption and its tools are sufficient to protect the software from any
disturbance.
Client-side application security: In this, we will make sure that any intruders cannot
operate on any browser or any tool which is used by customers.
Security Scanning: Security scanning can be done for both automation testing and manual
testing. This scanning will be used to find the vulnerability or unwanted file modification in a
web-based application, websites, network, or the file system. After that, it will deliver the
results which help us to decrease those threats. Security scanning is needed for those
systems, which depends on the structure they use.
31
Security Auditing: Security auditing is a structured method for evaluating the security
measures of the organization. In this, we will do the inside review of the application and the
control system for the security faults.
Ethical hacking: Ethical hacking is used to discover the weakness in the system and also
helps the organization to fix those security loopholes before the nasty hacker exposes them.
The ethical hacking will help us to increase the security position of the association because
sometimes the ethical hackers use the same tricks, tools, and techniques that nasty hackers
will use, but with the approval of the official person.
The objective of ethical hacking is to enhance security and to protect the systems
from malicious users' attacks.
32
33
34
35
1. Iteration 0
It is the first stage of the testing process and the initial setup is performed in this stage. The
testing environment is set in this iteration.
• This stage involves executing the preliminary setup tasks such as finding people for
testing, preparing the usability testing lab, preparing resources, etc.
• The business case for the project, boundary situations, and project scope are verified.
• Important requirements and use cases are summarized.
• Initial project and cost valuation are planned.
• Risks are identified.
• Outline one or more candidate designs for the project.
2. Construction Iteration
It is the second phase of the testing process. It is the major phase of the testing and most of
the work is performed in this phase. It is a set of iterations to build an increment of the
solution. This process is divided into two types of testing:
Confirmatory testing: This type of testing concentrates on verifying that the system meets
the stakeholder’s requirements as described to the team to date and is performed by the team.
It is further divided into 2 types of testing:
Agile acceptance testing: It is the combination of acceptance testing and functional
testing. It can be executed by the development team and the stakeholders.
Developer testing: It is the combination of unit testing and integration testing and
verifies both the application code and database schema.
Investigative testing: Investigative testing detects the problems that are skipped or ignored
during confirmatory testing. In this type of testing, the tester determines the potential
problems in the form of defect stories. It focuses on issues like integration testing, load
testing, security testing, and stress testing.
36
4. Production
It is the last phase of agile testing. The product is finalized in this stage after the removal of
all defects and issues raised.
1. Quadrant 1 (Automated)
The first agile quadrat focuses on the internal quality of code which contains the test cases
and test components that are executed by the test engineers. All test cases are technology-
driven and used for automation testing. All through the agile first quadrant of testing, the
following testing can be executed:
• Unit testing.
• Component testing.
37
4. Quadrant 4 (Tools)
The fourth agile quadrant focuses on the non-functional requirements of the product like
performance, security, stability, etc. Various types of testing are performed in this quadrant
to deliver non-functional qualities and the expected value. The testing activities that can be
performed in this quadrant are:
• Non-functional testing such as stress testing, load testing, performance testing, etc.
• Security testing.
• Scalability testing.
• Infrastructure testing.
• Data migration testing.
38
Mobile Applications
A mobile application is a program that was built to be used on mobile devices (smartphones,
tablets and various wearables). Mobile apps are not as straightforward as desktop web apps
and fall into three varieties: mobile web, native and hybrid apps.
Mobile web applications
A mobile web application is a program that can be accessed via a mobile browser, meaning
that you don’t have to download them to your device to start using them. Like web apps,
mobile web applications are usually built using JavaScript, CSS and HTML5; however, there
is no standard software kit. Contrary to other mobile applications, web apps for mobile use
are easier to build and test, but they’re usually much more primitive in terms of functionality.
Native applications
Fast and more advanced when it comes to features, native mobile applications run on the
device itself, so you have to download them before using them. Since they are platform-
specific, native mobile apps are built using specific languages and integrated development
environments (IDEs). For example, Android native applications are developed using Java or
Kotlin and Android Studio or Eclipse IDE. At the same time, to build an app for an Apple
device, you’ll need to use Objective-C or Swift and the XCode IDE. Native apps are secure,
integrate with the hardware perfectly and have the best UI/UX experience.
Hybrid applications
Hybrid apps combine the characteristics of native and mobile web apps. Built with the help
of the “standard web” stack (JavaScript, CSS and HTML5), they are then wrapped in a native
environment, so you can use the same code for different platforms. While running on your
mobile browser, hybrid applications are downloadable and have access to your camera, GPS,
contact list, etc. Though such applications are easier to build and maintain, they are slower
and offer less advanced functionality than their native counterparts.
39
Table 4.13 presents some sample functional test cases of the order process form of an
online shopping website.
40
Table 4.13. Sample functional test cases of order process of an online shopping web
application
2. User-interface Testing
User interface testing tests that the user interaction features work correctly. These
features include hyperlinks, tables, forms, frames and user interface items such as text fields,
radio buttons, check boxes, list boxes, combo boxes, command buttons and dialog boxes.
User interface testing ensures that the application handles mouse and keyboard events
correctly and displays hyperlinks, tables, frames, buttons, menus, dialog boxes, error
message boxes, and toolbars properly.
2.1. Navigation Testing
Navigation testing investigates the proper functioning of all the internal and external links.
Navigation testing must ensure that websites provide consistent, well-organized links and
should also provide alternative navigation schemes such as search options and site maps. The
placement of navigation links on each page must be checked. Search based navigation
facility must also be thoroughly tested and search items should be consistent across one page
to another. All the combinations of keywords and search criteria must be verified in
navigation testing. Table 4.14 presents test cases for navigation testing for an online
shopping website as given in Figure 4.13.
41
Table 4.14 Navigation testing test cases for online shopping website
Manual checking of hyperlinks can be very time consuming. There are various online
tools available for checking broken links, accuracy and availability of links and obtaining
advice on search engines. Some tools for navigation testing include Performance
Technologies’ TestLink, W3C’s Link checker, Xenu’s LinkSleuth, Dead Links’ Dead Links,
LinkTiger’s LinkTiger, Viable Software Alternative’s LinkRunner, Elsop’s LinkScan, REl
Software’s Link Validator, UCI’s MQMspider and Illumit’s WebLight.
42
Table 4.15 Test cases of registration form of an online shopping web application
3. Usability Testing
Usability testing refers to the procedure employed to evaluate the degree to which the software
satisfies the specified usability criteria.
4. Configuration and Compatibility Testing
One of the significant challenges of web testing is that it must ensure the proper
functioning of a web application on all the supported platforms and suitable environments.
Configuration testing determines the behaviour of the software with respect to various
configurations whereas compatibility testing determines whether the web application behaves
as expected with respect to various supported configurations.
5. Security Testing
Security is the procedure used to protect information from various threats. It is very
important to protect sensitive and critical information and data while communicating over the
network. The user wants implementation of a safeguard to protect personal, sensitive and
financial information. We want data to be accurate, reliable and protected against
unauthorized access.
Security involves various threats such as unauthorized users, malicious users, message
sent to an unintended user, etc. The primary requirement of security includes:
i. Authentication: Is the information sent from an authenticated user?
ii. Access Control: Is data protected from unauthorized users?
iii. Integrity: Does the user receive exactly what is sent?
iv. Delivery: Is the information delivered to the intended user?
v. Reliability: What is the frequency of a failure? How much time does the
network take to recover from a failure? What measures are taken to counter
catastrophic failure? vi. Non-repudiation: Is the receiver able to prove that the data
received came from a specific sender?
43
7. Database Testing
In web applications, many applications are database driven, for example, e-commerce
related websites or business-to-business applications. It is important for these applications to
work properly and provide security to the user’s sensitive data such as personal details and
credit card information. Testing data-centric web applications is important to ensure their
error- free operation and increased customer satisfaction.
For example, consider the example for purchasing items from an online store. If the
user performs a search based on some keywords and price preferences, a database query is
created by the database server. Suppose due to some programming fault in the query, the
query does not consider the price preferences given by the customer, this will produce
erroneous results. These kinds of faults must be tested and removed during database testing.
44
Table 4.16 shows sample test cases based on a user operation in an online shopping
website.
Internet Connection
The majority of web applications don’t function offline, and the same rule applies to mobile
web applications. To this end, when dealing with this type of apps, you should test if they
perform well under different speeds of the Internet connection. When it comes to native and
some hybrid mobile apps, it is critical to verify if an app works properly in the offline mode,
how it reacts to interrupted connection and how it functions with 3/4/5 G or WI-FI.
Compatibility
Web applications should be tested against different browsers, which also applies to their
mobile web and hybrid counterparts. From the device compatibility viewpoint, web-based
applications are usually more simple to test due to the functionality of a desktop. With
mobile apps, the testing procedure is much more complicated because of the wide variety of
mobile devices, which expand their functionality at an exponential rate. That is why, when
checking
45
Certainly, there’re a lot more commercial and open-source tools, but Selenium is still the most
popular open-source tool for automated testing against web apps and websites.
Selenium
Selenium is a powerful open-source automated testing framework consists of Selenium IDE,
Selenium WebDriver and Selenium Grid. Selenium supports multiple programming
languages for script creation, allows users to record and re-run saved scripts and works well
on different browsers and operating systems. While it’s not particularly self-sufficient,
Selenium can be easily integrated with other tools for test management, image-based testing,
performing load tests and efficient functioning in an agile working environment.
To execute Selenium WebDriver scripts, you need to ensure that you have the initial
configuration done. The WebDriver consists of three separate parts, take Chrome as an
example, the browser itself (“i.e. Chrome“), the language bindings provided (“the Driver”)
and an executable ChromeDriver downloaded from the Chromium project which acts as a
bridge between “chrome” and the “driver”. All of them is discussed here.
46
First of all, not all web application QA tools are applicable to mobile app testing.
Secondly, when choosing a tool or framework for your mobile app, consider if it is cross-
platform or designed for a particular OS.
Finally, not every mobile app testing tool is best for all application types: native, web mobile
and hybrid.
But don’t let the number of tools and frameworks scare you away from mobile app test
automation. We’ve gathered the best of them right here.
Appium
If you need a black-box mobile app testing tool, look no further than Appium. Based on
Selenium, it is an open-source tool for testing hybrid, web and native Android and iOS
mobile applications. Offering the Selenium set of features, Appium runs tests on real devices,
emulators and simulators.
It allows you to create test cases on a variety of programming languages, including Java, C#,
Python, PHP, etc., using the same API. Still, you’ll need to create separate iOS and Android
scripts to run UI tests. Like Selenium, Appium is a flexible tool and can be easily integrated
with other frameworks. Learn all tips and tricks about Appium here.
Espresso
Espresso is a UI quality assurance framework designed by Google for white box testing.
Since it was created to test Android native applications, Espresso tests can be written in Java
and Kotlin, the programming languages used to develop Android applications.
Due to the simple API, it easily adapts to your needs without the complexity of multi-
threaded testing. But the most outstanding feature of Espresso is that it provides automatic
synchronization between tests and applications (the test doesn’t continue until the application
is ready).
XCUITest / XCTest
For iOS functional and UI testing, XCUITest and XCTest are getting their popularity among
iOS developers. The reason being, they run tests inside the XCode IDE and testers can write
tests in either Objective-C and Swift.
XCUITest and XCTest can execute iOS tests much faster than other cross-platform
frameworks. Their tests are usually more reliable and trustable. However, it is because they
are native to iOS development and testing that keeps away many mobile developers that are
more looking into the flexibility of the used tools.
Calabash
Although the team behind it has stopped developing it, Calabash was once an open-source
automated QA tool for running functional and acceptance tests of native and hybrid
applications.
47
48