Chapter 2 SFT
Chapter 2 SFT
22518
Chapter 2
Types and Levels of Testing
(R-04, U-06, A-08 =18 Marks)
2.1 Levels of Testing
2.2 Unit Testing:
Stub and Driver
2.3 Integration Testing:
Top-Down Integration,
Bottom-Up Integration,
Bi-directional Integration.
2.4 Testing on Web Application:
Performance Testing: Load and stress,
security testing
Client-server Testing.
2.5 Acceptance Testing:
Alpha and Beta Testing,
Special Tests: Regression Testing, GUI Testing.
Mrs. Shubhangi Chintawar
Lecturer
VESP
Software Testing (22518) CO5I
Unit Testing
Testing of an individual software component or module is termed as Unit Testing. It is
typically done by the programmer and not by testers, as it requires detailed knowledge of the
internal program design and code.
Integration Testing
Testing of all integrated modules to verify the combined functionality after integration is
termed as Integration Testing.
System Testing
Under System Testing technique, the entire system is tested as per the requirements. It is a
Black-box type Testing that is based on overall requirement specifications and covers all the
combined parts of a system.
Acceptance Testing
An Acceptance Test is performed by the client and verifies whether the end to end the flow
of the system is as per the business requirements or not and if it is as per the needs of the end-user.
Client accepts the software only when all the features and functionalities work as expected.
Key Points: -
• Tested for proper information flow.
• Local data are examined to ensure that integrity is maintained.
• Boundary conditions are tested.
• Basis path testing should be used.
• Drivers and/or stubs need to be developed to test incomplete software.
• Focuses testing on the function or software module
• Concentrates on the internal processing logic and data structures
1
Software Testing (22518) CO5I
STUBS:
Serve to replace modules that are subordinate to (called by) the component to be tested and
do minimal data manipulation, provides verification of entry, and returns control to the module
undergoing testing
Assume you have 3 modules, Module A, Module B and module C. Module A is ready and we need
to test it, but module A calls functions from Module B and C which are not ready, so developer
will write a dummy module which simulates B and C and returns values to module A. This dummy
module code is known as stub.
Under
Under
Testing
Testing
DRIVERS:
A simple main program that accepts test case data, passes such data to the component being
tested, and prints the returned results
Now suppose you have modules B and C ready but module A which calls functions from
module B and C is not ready so developer will write a dummy piece of code for module A which
will return values to module B and C. This dummy piece of code is known as driver.
Under Testing
Under Testing
Drivers and stubs both represent overhead: - Both must be written but don’t make up part of the
software product.
2
Software Testing (22518) CO5I
3
Software Testing (22518) CO5I
Similarly Mail Box: Check its integration to the Delete Mails Module.
Test
Test Case Objective Test Case Description Expected Result
Case ID
Check the interface link Enter login credentials
To be directed to the Mail
1 between the Login and and click on the Login
Box
Mailbox module button
Check the interface link From Mailbox select the
Selected email should appear
2 between the Mailbox and email and click a delete
in the Deleted/Trash folder
Delete Mails Module button
Incremental Approach
In this approach, testing is done by joining two or more modules that are logically related.
Then the other related modules are added and tested for the proper functioning. The process
continues until all of the modules are joined and tested successfully.
4
Software Testing (22518) CO5I
Diagrammatic Representation:
Example: -
Suppose Real world software is under construction and conversion module is under testing, in such
case need driver which replace this real-world software.
These drivers send test-case data to the modules under test, read back the results, and verify that
they’re correct. You can very thoroughly test the software this way, feeding it all types and
quantities of data
Advantages:
• Fault localization is easier.
• No time is wasted waiting for all modules to be developed unlike Big-bang approach
• No need for stubs / fewer mock objects
• Logic modules tested thoroughly
• Testing can be in parallel with implementation
Disadvantages:
• Critical modules (at the top level of software architecture) which control the flow of
application are tested last and may be prone to defects.
• An early prototype is not possible
• Need drivers
Top-down Integration:
In this approach testing is conducted from main module to sub module. If the sub module
is not developed a temporary program called STUB is used for simulate the sub module.
5
Software Testing (22518) CO5I
Diagrammatic Representation:
Example: -
Suppose Temperature Display module is under testing and thermometer interface module is under
construction, so this module is replaced by stub to perform top down testing. This test file (stub)
provides temperature values to the temperature display module.
Advantages:
• Fault Localization is easier.
• No drivers needed
• Different order of testing/implementation possible
• Possibility to obtain an early prototype.
• Critical Modules are tested on priority; major design flaws could be found and fixed first.
Disadvantages:
• Needs many Stubs.
Bi-Directional Integration
Bi-directional Integration, is a kind of integration testing process that combines top-down
and bottom-up testing.
Bi-directional testing projects custom software development services provide the best quality of
the deliverables right from the development of software process. Bi-directional Integration testing
combines bottom-up and top-down testing. Here, top modules are tested with lower modules at the
same time lower modules are integrated with top modules and tested. This strategy makes use of
stubs as well as drivers.
6
Software Testing (22518) CO5I
System Testing
Units are integrated and integration testing is performed against groups of modules. This
process of incremental testing continues, putting together more and more pieces of the software
until the entire product or at least a major portion of it is tested at once in a process called system
testing.
System Testing (ST) is a black box testing technique performed to evaluate the complete system
the system's fulfillment against specified requirements. In System testing, the functionalities of
the system are tested from an end-to end perspective. Most of the software & hardware
compatibility issues can be uncovered using system test execution. It includes both functional and
Non-Functional testing.
2.4 Testing on Web Application: Performance Testing: Load and stress, security testing
Client-server Testing.
Testing is the process of exercising software with the intent of finding errors. Web-based
systems and applications reside on a network and interoperate with many different operating
systems, browsers (residing on a variety of devices), hardware platforms, communications
protocols, and “backroom” applications, the search for errors represents a significant challenge.
To understand the objectives of testing within a Web engineering context, need to consider
the many dimensions of WebApp quality.
Dimensions of Quality: -
1. Content is evaluated at both a syntactic and semantic level. At the syntactic level, spelling,
punctuation, and grammar are assessed for text-based documents. At a semantic level,
correctness, consistency and lack of ambiguity are all assessed.
2. Function is tested to uncover errors that indicate lack of conformance to customer requirements.
3. Structure is assessed to ensure that it properly delivers WebApp content and function, that it is
extensible, and that it can be supported as new content or functionality is added.
4. Usability is tested to ensure that each category of user is supported by the interface and can
learn and apply all required navigation syntax and semantics.
5. Navigability is tested to ensure that all navigation syntax and semantics are exercised to
uncover any navigation errors (e.g., dead links, improper links, erroneous links).
6. Performance is tested under a variety of operating conditions, configurations, and loading to
ensure that the system is responsive to user interaction and handles extreme loading without
unacceptable operational degradation.
7. Compatibility is tested by executing the WebApp in a variety of different host configurations
on both the client and server sides. The intent is to find errors that are specific to a unique host
configuration.
7
Software Testing (22518) CO5I
8. Interoperability is tested to ensure that the WebApp properly interfaces with other applications
and/or databases.
9. Security is tested by assessing potential vulnerabilities and attempting to exploit each. Any
successful penetration attempt is deemed a security failure.
Performance testing
Performance testing is used to uncover performance problems that can result from lack of
server-side resources, inappropriate network bandwidth, inadequate database capabilities, faulty or
weak operating system capabilities, poorly designed WebApp functionality, and other hardware or
software issues that can lead to degraded client-server performance.
The intent is twofold:
(1) to understand how the system responds as loading (i.e., number of users, number of
transactions, or overall data volume) increases and
(2) to collect metrics that will lead to design modifications to improve performance
The goal of Performance Testing is not to find bugs but to eliminate performance bottlenecks.
The focus of Performance Testing is checking a software program's
• Speed - Determines whether the application responds quickly.
• Scalability - Determines maximum user load the software application can handle.
• Stability - Determines if the application is stable under varying loads.
Load Testing
LOAD TESTING determines a system's performance under a specific expected load. This
9
Software Testing (22518) CO5I
purpose of Load Test is to determine how the application behaves when multiple users access it
simultaneously. The goal of Load Testing is to ensure smooth functioning of the software under
real-life load conditions. Load Testing is nonfunctional testing type and is a subset of Performance
Testing
10
Software Testing (22518) CO5I
• Choose a suitable tool. Select a tool that best caters to your needs.
• Create a test case. In writing a test case, make sure both positive and negative scenarios are
taken into account. Test cases must be accurate and capable of being traced to requirements.
• Understand your environment. Consider different types of deployments you might want to
test. Create configurations similar to typical production. Test different system capacities like
security, hardware, software, and networks.
• Run tests incrementally. During these tests, the system will ultimately fail. One key goal is
determining what volume results in failure, and spotlighting what fails first.
• Always keep end users in mind. The satisfaction of customers and site visitors is crucial to
the achievement of business metrics. This plays into their willingness to revisit a site or re-
access an application.
Stress Testing
Stress Testing verified the stability & reliability of the system. This test mainly determines the
system on its robustness and error handling under extremely heavy load conditions. Stress Testing
is done to make sure that the system would not crash. It even tests beyond the normal operating
point and evaluates how the system works under those extreme conditions.
11
Software Testing (22518) CO5I
5. Tweaking and Optimization – In the final step, you fine-tune the system, change
configurations, and optimize the code to meet the desired benchmark.
Security testing
Security testing verifies that protection mechanism built into system will protect it from
improper penetration. Security testing of any system is about finding all possible loopholes and
weaknesses of the system which might result into a loss of information by the hands of the
employees or outsiders of the Organization.
The goal of security testing is to identify the threats in the system and measure its potential
vulnerabilities. It also helps in detecting all possible security risks in the system and help
developers in fixing these problems through coding.
5. Availability- information must be available to authorized person(s) when they require it.
6. Non-repudiation - This ensures there is no denial from the sender or the receiver for sent
/received messages.
Advantages
1. Security testing determine whether proper technique is used to identify security risk.
2. It verifies that appropriate protection techniques are followed to secure the system.
3. Ensure that the implemented security measures are working properly.
4. Protect data and maintain its functionality.
2.5 Acceptance Testing: Alpha and Beta Testing, Special Tests: Regression Testing, GUI
Testing.
Acceptance Testing is a method of software testing where a system is tested for
acceptability. The major aim of this test is to evaluate the compliance of the system with the
business requirements and assess whether it is acceptable for delivery or not.
It is a formal testing according to user needs, requirements and business processes
conducted to determine whether a system satisfies the acceptance criteria or not and to enable the
users, customers or other authorized entities to determine whether to accept the system or not.
Acceptance Testing is the last phase of software testing performed after System Testing and before
making the system available for actual use.
These tests uncover the compatibility issues with the other systems available in the user
environment. It also uncovers the non-functional issues such as load & performance defects in the
actual user environment.
14
Software Testing (22518) CO5I
Advantages:
• It is conducted to ensure that system requirements meet business needs.
• The UAT process allows for any issues to be fixed before the system goes live.
• It helps in simulating the real-time user behavior and environment.
• It allows the company to improve the software quality by involving customer feedback.
Alpha Testing:
Alpha Testing is a type of software testing performed to identify bugs before releasing the
product to real users or to the public. Alpha Testing is one of the user acceptance testing.
Alpha testing involves both the white box and black box testing. Alpha testing is performed by
testers who are usually internal employees of the organization. Alpha testing is performed at
developer’s site. Reliability and security testing are not checked in alpha testing. Alpha testing
ensures the quality of the product before forwarding to beta testing. Alpha testing requires a testing
environment or a lab. Alpha testing may require long execution cycle. Developers can immediately
address the critical issues or fixes in alpha testing.
15
Software Testing (22518) CO5I
Beta Testing
Beta Testing of a product is performed by "real users" of the software application in a "real
environment" and can be considered as a form of external User Acceptance Testing.
Beta version of the software is released to a limited number of end-users of the product to obtain
feedback on the product quality. Beta testing reduces product failure risks and provides increased
quality of the product through customer validation.
Beta Testing is one of the Customer Validation methodologies to evaluate the level of customer
satisfaction with the product by letting it to be validated by the end users, who actually use it, for
over a period of time.
Product experience gained by the end users are asked for feedback on design, functionality, and
usability and this helps in assessing the quality of the product. Real People, Real Environment,
Real Product are the three R’s of Beta Testing and the question that arises here in Beta Testing
is “Do Customers like the Product?”.
Key Points: -
Beta testing commonly uses black box testing. Beta testing is performed by clients who are not
part of the organization. Beta testing is performed at end-user of the product.
Reliability, security and robustness are checked during beta testing. Beta testing also concentrates
on the quality of the product but collects users input on the product and ensures that the product is
ready for real time users.
Beta testing doesn’t require a testing environment or lab. Beta testing requires only a few weeks
of execution. Most of the issues or feedback collected from beta testing will be implemented in
future versions of the product.
16
Software Testing (22518) CO5I
Special Tests: -
Regression Testing
Regression Testing is a type of testing that is done to verify that a code change in the
software does not impact the existing functionality of the product. This is to make sure the product
works fine with new functionality, bug fixes or any change in the existing feature. Previously
executed test cases are re-executed in order to verify the impact of change. Regression means
retesting the unchanged parts of the application.
Regression testing is performed when there is high risk that changes may affect unchanged
components. Re-running previously conducted tests to ensure that unchanged components
function correctly and Reviewing previously prepared documents to ensure that they remain
correct after changes have been made.
Regression testing tests both the modified source code and other parts of the source code
that may be affected by the change.
17
Software Testing (22518) CO5I
The various steps are shown in Figure, Hence, test case selection for a failure is the main key for
regression testing.
Retest All
• This is one of the methods for Regression Testing in which all the tests in the existing test
bucket or suite should be re-executed. This is very expensive as it requires huge time and
resources.
18
Software Testing (22518) CO5I
Advantages
• It improves the quality of the Product.
• It ensures that any bug fix or enhancement that is done does not impact the existing
functionality of the Product.
• Automation tools can be used for this testing.
• It makes sure that issues that are already fixed do not occur again.
Disadvantages
• It has to be done for a small change in the code as well because even a small change in the
code can create issues in the existing functionality.
• If in case automation is not used in the Project for this testing, it will be a time consuming
and tedious task to execute the test cases again and again.
GUI Testing
GUI 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.
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 presents test cases for navigation testing for an online shopping website as the given
user interface testing checklist includes issues on hyperlinks for testers to ensure their proper
functioning.
19
Software Testing (22518) CO5I
20
Software Testing (22518) CO5I
Consider the registration form of an online shopping website. Its inputs include login id, password,
repeat password, name, last name, email address, phone number, shipping details (address, city,
state, zip code) and billing details (address, city, state, zip code).
Its form-based test cases are shown in Table
21
Software Testing (22518) CO5I
Configuration testing
Configuration testing is defined as a software testing type, that checks an application with
multiple combinations of software and hardware to find out the optimal configurations that the
system can work without any flaws or bugs. Configuration testing is a method of testing a system
under development on multiple machines that have different combinations or configurations of
hardware and software. The performance of the system or an application is tested against each of
the supported hardware & software configurations.
When we say different configurations of hardware & software, it is attributed to multiple
operating system versions, browsers, supported drivers, memory sizes, hard drive types, CPU's,
etc.
22
Software Testing (22518) CO5I
Compatibility Testing
Compatibility testing is a non-functional testing conducted on the application to evaluate the
application's compatibility within different environments.
It can be of two types - forward compatibility testing and backward compatibility testing.This
testing establishes or confirms that the product meets all the requirements set and agreed upon by
both the developer and the end user
• Forward Compatibility Testing: This type of testing verifies that the software is
compatible with the newer or upcoming versions, and is thus named as forward compatible.
• Backward Compatibility Testing: This type of testing helps to check whether the
application designed using the latest version of an environment also works effortlessly in
an older version.
It is the testing performed to check the behavior of the hardware/software with the older
23
Software Testing (22518) CO5I
Usability Testing
• Usability is how appropriate, functional, and effective that interaction is.
• The means that you use to interact with a software program is called its user interface, or
UI.
• Usability testing, a non-functional testing technique that is a measure of how easily the
system can be used by end users
Learnability: - How easily the first-time user is able to grasp and use the website?
Memorability: - How easy is it for returning customer to remember the interface?
Ease of Use: - How easily customer can navigate?
Efficiency: - How effectively the customer can perform tasks?
Appeal: - How positive customers feels about the user interface and its experience?
24
Software Testing (22518) CO5I
Important Questions
1. State any two examples of integration testing.
2. Differentiate between alpha and beta testing. (four points)
3. State the testing approaches that are considered during client server testing.
4. With respect to GUI testing write the test cases for Amazon login form.
5. With the help of neat diagram, describe unit testing.
6. Describe how to perform usability and GUI testing.
7. Explain following concepts related to Integration testing with neat & labeled diagram:
(i) Top-down testing.
(ii) Bottom-up testing.
8. Explain Client-Server testing.
9. Describe acceptance testing with its advantages.
25