friday 6 september 2002(c) 2002 the authors. all rights reserved.1 a framework for testing wireless...
TRANSCRIPT
Friday 6 September 2002
(c) 2002 The Authors. All Rights Reserved. 1
A Framework for Testing Wireless Applications
Ibrahim K. El-Far Roussi Roussev Nattawut Sridranop
Florida Institute of TechnologyMelbourne, Florida, United States
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 2
Agenda
A word about the project A quick background on WAP An introduction to model-driven
testing A report on project activities and
status A discussion of future work Summary and conclusions
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 3
About the Project
History – contract, initial problems Staff – abilities, skills, assignments Scope – extent of activities Requirements – deliverables,
demonstrations Approach – planning, solutions, tools Status – achievements, remainder of work
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 4
Handheld Wireless Devices
Low power requirements Low and variable bandwidth High latency Ephemeral network connectivity Weak processing power Typically small displays Limited user input
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 5
Wireless Application Protocol Consists of a collection of specifications
of wireless solutions Solutions are claimed to address the
aforementioned constraints of handheld wireless devices
Proposed by the WAP Forum (now Open Mobile Alliance)
Possesses backing of various major industry players
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 6
WAP: The Big Picture
WAPgateway
cellphone
pager
Web
WirelessNetwork
Internet
TCP/IP request
TCP/IP reply
WAPrequest
WAPreply
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 7
Architecture: WAP vs. Internet
HTMLJavaScript
Transport Control Protocol / Internet Protocol
Hypertext Transfer Protocol
Transport Layer Security - Secure Sockets Layer
Application layer(Wireless Application Environment)
Session layer(Wireless Session Protocol)
Security layer(Wireless Transport Layer Security)
Transport layer(Wireless Datagram Protocol)
Underlying Bearer Service
Transaction layer(Wireless Transaction Protocol)
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 8
Wireless Session Protocol
A binary hypermedia transfer protocol
Provides both connection-oriented and connectionless modes of service
Provides a Push mechanism
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 9
continued
Wireless Session Protocol Connection-oriented mode
Reliable transfer of packets Transient network connectivity is addressed
Connectionless mode Unreliable transfer of packets Stateless
Provides a Push mechanism Initiated by server Intended for software updates and
provisioning
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 10
Wireless Markup Language A markup language that extends
XHTML Provided for backward compatibility Earlier versions were extensions of
XML We were asked to consider WML 1 WAP 2 requires XHTML Mobile Profile Addresses the peculiar needs of
narrowband wireless devices
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 11
WML 1.3
Information is organized into decks and cards
A card specifies units of interaction Cards are grouped into decks A deck is analogous to an HTML
page
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 12
WML 1 Sample<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN""http://www.wapforum.org/DTD/wml_1.1.xml">
<wml><card id="card1" title="WML test page">
<p>Content</p>
</card>
</wml>
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 13
Model-Driven Testing
Understanding of Application
Understanding of Application Build &
Validate Model
Modelof
Application Generate TestsTest Suites
&Scripts
Ru
n S
cripts
ApplicationUnderTest
TestOracle
Get expected result
Get actual resultTest Pass& Failure
DataAnalyze
Data
Decide whether to• Generate more tests• Modify the model• Stop testing
Estimate• Reliability & other
quality measures
Test Objectives &Stopping Criteria
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 14
Grammars A grammar is a formal system of an
alphabet and a number of rules The rules describe how to form words
and or sentences based on the alphabet A grammar defines a language or the
collection of all words and or sentences that can be formed using its rules
ISO 14977 standard defines a notation that can be used to express grammars
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 15
Grammars: ExampleSentence = Noun Phrase, Verb Phrase;
Noun Phrase = Proper Noun | Determiner, Common Noun;
Proper Noun = “John” | “Jill”;
Common Noun = “car” | “hamburger”
Determiner = “a” | “the”
Verb Phrase = Verb, Adverb | Verb;
Verb = “drives” | “eats”;
Adverb = “slowly” | frequently”;
(Example taken almost verbatim from Thomas Sudkamp’s“Languages and Machines: An Introduction to the Theory of Computer Science,” published by Addison-Wesley, 1997)
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 16
Example Generated Sentences
John eats slowly
The car drives frequently
Jill drives slowly
.
.
.
.
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 17
Project Deliverables
Test design Test automation framework Test suites used Problem reports
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 18
Scenario 1
WML Test Environment Set Up
Web
WirelessNetwork
Internet
WAPrequest
WAPreply
WAPgateway
TCP/IP request
TCP/IP reply
WebServer
DeveloperMachine
WMLtests
WMLParser
WMLmodel-basedtest generatorWML tests
HTT
PCEPC
WA
P
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 19
Scenario 2
WSP Test Environment Set Up
WirelessNetwork
WAPrequest
WAPreply
WAPServer
DeveloperMachine
WSP tests
ProtocolParser
WSPmodel-basedtest generator
WSP Tests
CEPC
WA
P
Test Lab LAN
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 20
Modeling the WSP Get
Fields in every PDU TID (associates requests with replies) Type (identifies PDU type; 0x40 for Get)
Fields of the Get PDU URILen (length of the URI Field) URI (Universal Resource Identifier) Headers (headers associated with
request)
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 21
continued
Modeling the WSP Get
General PDU = TID, Specific Type PDU;
Specific Type PDU = Get PDU | … other PDUs …;
Get PDU = Get Type, URILen, URI, Headers;
Get Type = “0x40”;
URILen = uintvar; (* unsigned variable-length integer*)
URI = (* list of test URI’s *)
Headers = (* Extracted from grammar in specifications *)
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 22
Modeling WML 1.3Verbatim from DTD:
<!-- flow covers "card-level" elements, such as text and images -->
<!ENTITY % flow "%text; | %layout; | img | anchor |a |table">
<!-- Task types --><!ENTITY % task "go | prev | noop | refresh">
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 23
continued
Modeling WML 1.3Equivalent rules in grammar:
(* ENTITY flow *)
flow = text | layout | img | anchor | a | table;
(* ENTITY task *)
task = go | prev | noop | refresh;
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 24
continued
Modeling WML 1.3Verbatim from DTD:
<!ELEMENT wml ( head?, template?, card+ )>
Rule in grammar:
wml element = "<wml", wmlAttr, ">", [head], [template], card, {card}, "</wml>";
Friday 6 September 2002
(c) 2002 The Authors. All Rights Reserved. 25
Demo
Or What Kind of Tool is Needed to Model Applications
and Generate Tests
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 26
Future Work Model other components of WAP Improve collecting & evaluating
results Automate model building for certain
types of systems Develop better techniques for
generating interesting tests Enhance existing tools to help users
better visualize models
Friday 6 September 2002
(c) 2002 The Authors. All Rights Reserved. 27
Questions and Comments
Friday 6 September 2002 (c) 2002 The Authors. All Rights Reserved. 28
Contact Information
You can reach Ibrahim K. El-Far byEmail: [email protected]: http://www.testingresearch.com/
You can reach Roussi Roussev byEmail: [email protected]
You can reach Nattawut Sridranop byEmail: [email protected]