UNIT-IV Notes
UNIT-IV Notes
UNIT IV
Spike testing: It is a type of load testing that tests the system’s ability to
handle sudden spikes in traffic. It helps identify any issues that may occur
when the system is suddenly hit with a high number of requests.
Soak testing: Soak testing is a type of load testing that tests the system’s
ability to handle a sustained load over a prolonged period. It helps identify
any issues that may occur after prolonged usage of the system.
2. Error Rate
The Error Rate is mentioned in terms of percentage denotes the
number of errors occurred during the requests to the total number of
requests. These errors are usually raised when the application is no longer
handling the request at the given time or for some other technical problems.
It makes the application less efficient when the error rate keeps on
increasing.
3. Throughput
This metric is used in knowing the range of bandwidth consumed during
the load scripts or tests and it is also used in knowing the amount of data
which is being used for checking the request that flows between the user
server and application main server. It is measured in kilobytes per second.
5. Concurrent Users
This metric is used to take the count of the users who are actively present at
the particular time or at any time. It just keeps track of count those who are
visiting the application at any time without raising any request in the
application. From this, we can easily know that at which time the high
number of users are visiting the application or website.
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.
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.
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.
early phases of the product development process. Users mostly spare 5–10
minutes and give instant feedback on the product. Also, the cost is
comparatively low as you don’t need to hire participants. It is also known as
corridor or hallway testing.
2. Usability Lab
Usability lab testing is conducted in a lab environment where moderators
(who ask for feedback on the product) hire participants and ask them to
take a survey on the product. This test is performed on a tablet/desktop.
The participant count can be 8-10 which is a bit costlier than guerrilla
testing as you need to hire participants, arrange a place, and conduct
testing.
• Packaging text and graphics. This includes the box, carton, wrapping,
and so on. The documentation might contain screen shots from the
software, lists of features, system requirements, and copyright information.
• Marketing material, ads, and other inserts. These are all the pieces of
paper you usually throw away, but they are important tools used to promote
the sale of related software, add-on content, service contracts, and so on.
The information for them must be correct for a customer to take them
seriously.
Warranty/registration. This is the card that the customer fills out and sends
in to register the software. It can also be part of the software, being displayed
onscreen for the user to read, acknowledge, and complete online.
Figure 4.10 There’s lots of documentation on this disk label for the software
tester to check.
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.
engineers review the features which have been created entirely and test if the
features are ready to go live or not and the features that need to be sent
again to the previous development phase.
4. Daily Scrums: This phase involves the daily morning meetings to check
on testing and determine the objectives for the day. The goals are set daily
to enable test engineers to understand the status of testing.
5. Test Agility Review: This is the last phase of the agile testing lifecycle that
includes weekly meetings with the stakeholders to evaluate and assess the
progress against the goals.
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
Panimalar Engineering College 28
21IT1904 UNIT-IV SOFTWARE TESTING AND AUTOMATION
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.
3. Quadrant 3 (Manual)
The third agile quadrant provides feedback to the first and the second
quadrant. This quadrant involves executing many iterations of testing, these
reviews and responses are then used to strengthen the code. The test cases
in this quadrant are developed to implement automation testing. The testing
that can be carried out in this quadrant are:
Usability testing.
Collaborative testing.
User acceptance testing.
Pair testing with customers.
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.
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
Panimalar Engineering College 31
21IT1904 UNIT-IV SOFTWARE TESTING AND AUTOMATION
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.
1. Functional Testing
Functional testing involves checking of the specified functionality of a
web application. Functional test cases for web applications may be generated
using boundary value analysis, equivalence class testing, decision table
testing and many other techniques.
Example:
Let us consider the eCommerce application sells products such as
computers, mobile phones, cameras, electronics, etc. The home page of this
web application is given in Figure 4.13.
Table 4.13 presents some sample functional test cases of the order
process form of an online shopping website.
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.
Panimalar Engineering College 34
21IT1904 UNIT-IV SOFTWARE TESTING AND AUTOMATION
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. 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 mobile applications for compatibility, it is critical to
pay attention to the technical characteristics of each mobile device and how
they affect the behavior of your app. The most important of these
characteristics are:
Capacity limitations
Note that RAM and SSD are absolutely different for web and mobile. While
some mobile devices can ship 3-4GB of RAM, the capacity of even the best
smartphone falls behind that of an average desktop. To this effect, if your
app isn’t properly optimized for mobile use, it will function much slower
than its desktop fellow. Furthermore, since mobile apps are updated more
frequently than their web counterparts, it is critical to test how your app
affects memory and whether it resumes proper work after a number of
updates and installations.
Battery life
Desktop computers don’t have problems like this, but a smartphone battery
that’s running low has become an actual nightmare for thousands of people.
Even when you’re using a laptop, having a dead computer is not as bad as
having a dead mobile phone. An application that drains battery life will be
deleted soon. So, it is paramount for your QA team to check the
performance of a mobile application on a fully-charged and a low-charged
device.
Screen size
While desktops are limited to a few screen dimensions, mobile devices offer
much greater variety in this respect. It is important to examine specific
mobile screen dimensions and make sure that all the app fields are visible
and easy to access.
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.
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
Panimalar Engineering College 37
21IT1904 UNIT-IV SOFTWARE TESTING AND AUTOMATION
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.
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.
Users can run simultaneous tests against multiple devices in parallel with
Calabash, and it provides an API for testing native applications on touch
screen devices. The only minor setback is that the test scripts have to be
written in Ruby only.