0% found this document useful (0 votes)
25 views

Web Testing

1) The document discusses testing web applications, including challenges in testing both the client and server sides together. It proposes testing the server-side code independently of the web application and testing client-side code without server interaction. 2) The document also discusses unit testing web applications, as well as static and dynamic validation. It provides examples of modeling a web application using UML and generating test cases from the models. 3) The ReWeb and TestWeb tools are described, which can model a web application, determine paths to generate test cases, and execute the test cases. An example using these tools to test the WordNet application is provided.

Uploaded by

arpitamondal
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Web Testing

1) The document discusses testing web applications, including challenges in testing both the client and server sides together. It proposes testing the server-side code independently of the web application and testing client-side code without server interaction. 2) The document also discusses unit testing web applications, as well as static and dynamic validation. It provides examples of modeling a web application using UML and generating test cases from the models. 3) The ReWeb and TestWeb tools are described, which can model a web application, determine paths to generate test cases, and execute the test cases. An example using these tools to test the WordNet application is provided.

Uploaded by

arpitamondal
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Testing Web Applications Testing Web Applications

By Adithya N.
? Going Faster: Testing The Web Application
Edward Hieatt and Robert Mee (IEEE

Software)
? Analysis and Testing of Web Applications
Filippo Ricca and Paolo Tonella

Testing Challenges
? The

An Article: Going FasterFasterTesting The Web Application

web Browser has an ability to send information through a map of string to a web server ? The server deals with the requests by passing it off to an engine running application code ? Test Client and server part ? Difficult to come up with testing framework for testing both at once

Solutions
? Test

Testing Server Output


? Goal:

parts of the server side code that are not directly concerned with being part of web application ? Test parts of the client side code that have no server interaction
JsUnit a testing framework for testing JavaScript ? Functional test that simulate the request/response

environment
Framework:
? ?

Test data in the output not the web page look ? Create UI <- XML -> HTML(using XSLT) ? Clean separation of testable data from HTML ? Compare the actual output with expected output

State of the code Simulate user interaction with UI

Unit Test
? Unit

Example: Testing the Servlet


? For

test, for a new piece, before coding ? Positively affect overall code design ? Code Reusability ? Loose coupling between classes

example: overloading service() subclass, or a whole hierarchy of different classes makes it difficult to test ? Test-first approach removes code that handles request from the servlet itself and put it into its own class ? Modified Service(): creating new object (dispatcher) and handle the control to it. ? The dispatcher and each command object have their own tests.
? Servlet

Acceptance Tests
? Allows

product managers to express tests at the scenario level ? Testing tool that express operations in the system and the expected results as XML. ? EAI (Enterprise Application Integration) tool configured to generate XML ? XML though workable, is awkward for a human to write ? Evant Script Programming (ESP), which is more compact and readable than XML

Analysis and Testing of Web Applications

Outline
? Create a UML ? Use

Unified Modeling Language


? Standard for building object oriented ? UML

model of Web Application

Model to Test Application

Test case generation ? Tools ReWeb TestWeb ? Example applications: Wordnet Amazon.com

software defines the notation and semantics for the following domains:
Use Case Model The Interaction or Collaboration Model The Logical or Class Model The Physical Component Model

Analysis Model Example: UML

Generic Web Application Structure

Model with Frames

Model with a Form

Testing:Static Verification
? Static

Testing: Dynamic Validation


? White box testing ? Test

analyzers

to scan the HTML pages in a web site detect possible faults and anomalies ? Analyzing

models of site helps determining:

Unreachable Pages Ghost Pages Reaching Pages Data Dependencies Dominators

case for a web application is a sequence of pages to be visited + the input values to be provided to pages containing forms ? Execution consists of requesting the Web Server for the URLs in the sequence and storing the output pages

Dynamic Validation (cont)


? White box testing criteria: Page testing Hyperlink testing Definition-use testing All-use testing All-paths testing ? Def-use

Dynamic Validation (cont)


? Reduced Graph:
Retain relevant entities Remove static pages not containing forms and

link all its predecessors to all its successors


? Effective way of generating test cases

and All-paths criteria are often impractical because of the infinite paths in a site ? But can be satisfied with additional constraints

Model with a Frame Test case Generation


? Select

a set of paths in the web site graph and provide input ? Based on path expression ? Since Path expression directly represents all paths in the graph, it can used to generate test cases. ? Tester has to insert input values for the variables collected through forms ? Highly benefits regression testing
Path Expression: e 1e2e3e4 + e 5e6e7

ReWeb and TestWeb


? Spider ? Analyzer ? Viewer

ReWeb

? User can attach conditions to edges whose

existence depends on the input values

Analysis

Testing

ReWeb and TestWeb


? Determines

TestWeb
? Test case generation engine

path from model and generates test cases ? Test cases are sequences of URLs ? Satisfying selected coverage criteria ? Input value supplied by user

Experiment
? ReWeb and TestWeb on Wordnet

(http://cogsci.princeton.edu/~wn/) is a lexical reference system ? English nouns, verbs, adjective and adverb are organized into synonym sets, each representing one underlying lexical concept ? Different relation links the synonym sets
? Wordnet

ReWeb Model of Wordnet

Wordnet
? Three stages
0 webwn0: initial input page 1 webwn1: selection among alternative senses 2 webwn2: final output

? Hidden stages with page webwn,

incremented values are passed to server each time (using cookies)

Test case Generation and Execution


? Feasible paths can be computed from path

Conclusion
? The technique and analysis proposed helps

expression e1e2e3(e4e5 + e6e7) ? Insert edge conditions (isNoun(word), etc) ? Select input to make each condition true ? Generate test cases ? Executed test cases ? No defect found

in assessing the site quality ? Allows a deep insight in the internal functioning of the web applications ? Future work
Reduction of the manual activities (e.g. State

unrolling )

You might also like