Introduction To Software Testing Engineering Criteria For Technologies
Introduction To Software Testing Engineering Criteria For Technologies
Chapter 7.2
Engineering Criteria for Technologies
http://www.cs.gmu.edu/~offutt/softwaretest/
The Technologies
Chapters 1-5 emphasize criteria on four models of
software
Emphasis in each chapter was first on the criteria, then
on how to construct the models from different software
artifacts
This chapter discusses how to apply the criteria to
specific technologies
– Most of the ideas in this chapter were developed after the year
2000
– Thus they are still evolving
2
Chapter 7 Outline
1. Object-Oriented Software
2. Applications and
Web Applications and Web
Web Services
Services
3. Graphical User Interfaces
4. Real-Time and Embedded Software
1. Overview
2. Static Hyper Text Web Sites
3. Dynamic Web Applications
1. Client-side testing
2. Server-side testing
4. Web Services
Presentation layer
server
server server
client
server
How you’ns doin’ Jeff Offutt! Huan ying guang ling, Wang Shuang!
Search Search
X XX XXX A B C D
Bad Data
Check data • Corrupts data base
Check data • Crashes server
• Security violations
Sensitive
Data
Client
Server
Malicious
Data
Can “bypass”
data checking
Introduction to Software Testing (Ch 7.2)
© Ammann and Offutt 26
Bypass Testing
“bypass” client-side constraint enforcement
Version to purchase:
Version to purchase:
Original SQL:
SELECT username FROM adminuser WHERE
username=‘turing’ AND password =‘enigma’
“injected” SQL:
SELECT username FROM adminuser WHERE username=‘turing’
OR ‘1’ = ‘1’ AND password =‘enigma’ OR ‘1’ = ‘1’
no
myspace.com source
Events & Music
(or
Item permission)
dispatch, needed !
wellsfargolife.com
Handle buy Quote search
Search
Empty } else
atomic P5 = { }
Content
section P6 = out.println (“</BODY></HTML>"); variables
out.close ();
Introduction to Software Testing (Ch 7.2)
© Ammann and Offutt 46
Atomic Sections
A section of HTML with the property that if any part of
the section is sent to a client, the entire section is
– May include JavaScript
– All or nothing property
An HTML file is an atomic section
Content variable : A program variable that provides
data to an atomic section
Atomic sections may be empty
S = login.html
A = {p1, p2, p3, p4, p5, p6 }
CE = gradeServlet = p1 • ((p2 • p3* ) | p4 | p5) • p6
T = {login.html gradeServlet [get, (Id, Password, Retry)],
gradeServlet.p4 sendMail [get, ()],
gradeServlet.p4 gradeServlet [get, (Retry)] }
gradeServlet p1
p2
p4 p5 get ()
sendMail
p3
p6
Introduction to Software Testing (Ch 7.2)
© Ammann and Offutt 55
Atomic Section Modeling
Atomic sections provide a fundamental mechanism to
model Web applications presentation layer
Can handle :
– Distributed integration
– Dynamically created HTML pages
– Operational transitions
Requires deep analysis of software source