2 Testing Web Applications
2 Testing Web Applications
Applications
Topics
WHAT IS TESTING ?
TESTING PROCESS
TYPES OF TESTING
MVC
COST ESTIMATION FOR SOFTWARE PROJECTS
ESTIMATION FOR AGILE AND WEBAPPS
CONCLUSIONS
TESTING WEB APPLICATIONS
Testing:
Testing is the process of exercising software with the intent
of finding of errors.
Web Testing:
Webapp testing is a collection of related activities with a
single goal: to uncover errors in webapp content, function, usability,
navigability, performance, capacity, and security.
Challenges in Web application testing:
Web based systems and applications reside on network and
interoperate with many different
1. operating systems,
2. browsers,
3. hardware platforms,
4. communications protocols,
the search for errors represents a significant challenge
Dimensions of Quality for Web Applications:
Quality is incorporated into a web application as a consequence of
good design. Reviews and Testing examine one or more of the
following quality dimensions.
1.Content 2.Function 3.Structure
4.Usability 5.Navigability 6.Performance
7.Compatibility 8.Interoperability 9.Security.
Common Errors in Web
Applications
• You often see a symptom of the error, not the error itself.
• It may be difficult or impossible to reproduce an error outside the
environment in which the error was originally encountered.
• Many errors can be traced to the webapp configuration.
• Errors can be difficult to trace across three architectural layers: the
client, the server, or the network itself.
• Some errors are due to the static operating and others are
attributable to the dynamic operating Environment.
Testing Approach for web application :
Content
testing Interface testing
Navigation
testing
Interfa
ce
Component
Aesthetic testing
design
Content design
Navigation design
Configuratio
Architecture design n testing
Component design
Performance Security
testing testing
Technology
Content Testing:
When a user interacts with a webapp, the interaction occurs through one
or more interface mechanisms.
Links:
Each navigation link is tested to ensure that the proper content object or
function is reached.
Forms:
• At a macroscopic level, tests are performed to ensure that Labels correctly
identify fields within the form and that mandatory fields are identified
visually for the user
• The server receives all information contained within the form and that no
data are lost in the transmission between client and server
• Appropriate defaults are used when the user does not select from a pull-
down menu or set of buttons
• Browser functions(e.g., back arrow) do not corrupt data entered in a form
Interface mechanisms
Client-side scripting:
1. Black-box tests are conducted to uncover any errors in processing as the
script is executed.
2. These tests are often coupled with form testing, because script input is
often derived from data provided as part of forums processing.
3. A compatibility test should be conducted to ensure that the scripting
language that has been chosen will work properly in the environmental
configurations that the webapp.
Dynamic HTML:
1. Tests should be conducted to ensure that dynamic HTML is displayed
correctly.
2. Compatibility test should be conducted to ensure that dynamic HTML
works properly in the environmental configurations that support the webapp
Interface mechanisms
Pop-up windows:
A series of tests ensure that
• The pop-up is properly sized and positioned
• The pop-up does not cover the original webapp window
• The aesthetic design of the pop-up is consistent with aesthetic design of
the interface
• Scroll bars and other control mechanisms appended to the pop-up are
properly located and function is required.
Interface mechanisms
Streaming content:
Tests should demonstrate that streaming data are up-to-date properly
displayed, and can be suspended without error and restarted without
difficulty.
Cookies:
On the server side, tests should ensure that a cookie is properly
constructed and properly transmitted to the client side when specific
content or functionality is requested and to ensure that its expiration date
is correct.
On the client side, tests determine whether the webapp properly attaches
existing cookies to a specific request sent to server
Compatibility tests:
• A series of compatibility validation tests are derived, often adapted
from existing interface tests, navigation tests, performance tests, and
security tests.
• The intent of the test is to uncovers the errors or execution problem
that can be traced to configuration differences.
Component
• Component-level level testing
testing, also called function testing, focuses on a set of tests
that attempt to uncover errors in webapp functions. Each webapp function is a
software component (implemented in one of a variety of programming or
scripting languages) and can be tested using black box or sometimes white box
techniques
To ensure that the mechanisms that allow the webapp user to travel
through the webapp are all functional and to validate the each NSU
can be achieved by the appropriate user category
Navigation mechanisms are tested to ensure that each performs its
intended function.
Navigation mechanisms
• Navigation
Internal, External links and anchors within a specific web page
should be tested to ensure that proper content or functionality is reached
when the link is chosen.
• Bookmarks
Even it is a browser function, the webapp should be tested to ensure
that a meaningful page title can be extracted as the bookmark is created.
• Redirects
Redirects should be tested by requesting incorrect internal links or
external URLs and assessing how the webapp handles these requests.
Navigation mechanisms
CONTINUATION…
Client-side issues:
• On the client side, configuration test focus more heavily on webapp
compatibility with configurations that contain one or more
permutations of the following components.
• Hardware – CPU, memory, storage, and printing devices
• Operating systems - Linux, Macintosh OS, Microsoft Windows, a
mobile- based OS
• Browser software - Firefox, Safari, IE, Opera, Chrome, and others
• User interface components- Active X, Java applets, and others
• Plug-ins- QuickTime, RealPlayer, and many others
• Connectivity – cable, DSL, regular modem, T1,WiFi
Security Testing
Webapp architecture
• WebApp architecture describes an infrastructure the enables a web-
based system or application to achieve its business objectives
• Applications should be built using layers in which different concerns
are taken into account.
• In particular, application data should be separated from the page’s
contents(navigation nodes) and these contents, in turn , should be
clearly separated from the interface look-and–feel(pages)
• The Model-View-Controller(MVC) architecture is one of a number of
suggested webapp infrastructure models that decouple the user
interface from the webapp functionality and informational content.
MODEL-VIEW-CONTROLLER
Controller:
Manages user requests Behavior request (state
Selects model behavior change)
User request or data Selects view response
View selection
Model:
Encapsulates functionality
Encapsulates content objects
Incorporates all webapp states
Browser
Data
from
model
H View Update
Client T Prepares data from model External Data
M Request updates from model request
L Presents view selected by
d controller
a
t
a
Server
MODEL-VIEW-CONTROLLER
Decomposition Techniques:
Decomposition techniques take a divide-and-conquer approach to
software project estimation.
By decomposing a project into major functions and related software
engineering activities, cost and effort estimation can be performed in a stepwise
fashion.
Software sizing:
• The accuracy of a software project estimate is predicated on a
number of things:
• The degree to which you have properly estimated the size of the
product to be built
• The ability to translate the size estimate into human effort, calendar
time, and dollars
• The degree to which the project plan reflects the abilities of the
software team
• The stability of product requirements and the environment that
supports the software engineering effort
ESTIMATION FOR SOFTWARE PROJECTS
Continuation…
• Function point sizing : The planner develops estimates of the
information domain characteristics.
• Standard component sizing : Software is composed of a number of
different “standard components” that are generic to a particular
application area.
• Change sizing : This approach is used when a project encompasses
the use of existing software that must be modified in some way
ESTIMATION FOR SOFTWARE
PROJECTS
Problem-Based estimation:
• LOC and FP data are used in two ways during software project
estimation:
• As estimation variables to “size” each element of the software
• As baseline metrics collected from past projects and used in
conjunction with estimation variables to develop cost and effort
projections
• Baseline productivity metrics(e.g., LOC/pm or FP/pm^6) are then
applied to the appropriate estimation variable, and cost or effort for
the function is derived.
• Function estimates are combined to produce an overall estimate for
the entire project.
ESTIMATION FOR SOFTWARE
PROJECTS
Process-Based Estimation
• The most common technique for estimating a project is to base the
estimate on the process that will be used. That is, the process is
decomposed into a relatively small set of tasks and the effort
required to accomplish each task is estimated.
• Like the problem-based techniques, process-based estimation begins
with a delineation of software functions obtained from the project
scope. A series of framework activities must be performed for each
function.
ESTIMATION FOR SOFTWARE
PROJECTS
Continuation…
• 3a. The effort required for each task is estimated separately. Note:
Estimation can be based on historical data, an empirical model, or
“experienced”
• 3b. alternatively, the “volume” of the scenario can be estimated in
LOC, FP, or some other volume-oriented measure
• 4a. Estimates for each task are summed to create an estimate for the
scenario.
• 4b. alternatively, the volume estimate for the scenario is translated
into effort using historical data.
• The effort estimates for all scenarios that are to be implemented for
a given software increment are summed to develop the effort
estimate for the increment
ESTIMATION FOR SOFTWARE
PROJECTS
Continuation…
• Outputs are each static web page, each dynamic web page script(for
e.g., ASP, ISAPI, or other DHTML script), and each report(whether
web based or administrative in nature).
• Tables are each logical table in the database plus, if you are using
XML to store data in a file, each XML object( or collection of XML
attributes)
• Interfaces retain their definition as logical files(for e.g., unique record
formats) into our out-of-the-system boundaries
• Queries are each externally published or use a message-oriented
interface. A typical example is DCOM or COM external references.
• For more information: software estimation techniques
Conclusion