Software Testing I: Prof. Dr. Holger Schlingloff
Software Testing I: Prof. Dr. Holger Schlingloff
- Motivation, definitions,
- Topics, classification, tools
Literature
P.C. Jorgensen: Software Testing,
Why Testing?
Perpetual software crisis
Ever-increasing complexity,
ubiquity
Continuous stories about
bad software
Customer dissatisfaction, damage
Millions and millions of lost revenues
Proficient testers are well-engaged and wellpaid people
needs planning
needs analysis of the object
needs measurement
What is Software?
systematically experimenting with an object
Object: as contrasted to the subject conducting the
test (SUT = system under test or software
under test, IUT = implementation under test)
Software: precise description of information
processing activities to be executed by a machine
non-ambiguous, finite, executable, in some programming
language,
- functionality, usefulness
- efficiency (time, space, money)
- safety, reliability, robustness, fault-tolerance
- usability, maintainability,
- most important: correctness, i.e. absence of errors
Specifications
Testing is impossible without specification
Often, specifications are implicit or imprecise
the SUT shall never crash
no error messages, no doesnt respond
all buttons can be pressed, all methods can be
called, all functions can be accessed
as fast as possible, security must be
maintained, with feasible cost/benefit ratio
their absence.
Hoare (attributed): Beware of this program. I havent tried it
yet, I only proved its correctness.
Consider two airplanes: One brand new, with verified but untested
software. The other one with software which is thoroughly tested but
not verified. Which one would you enter?
Fault
Failure
Requirements Analysis
System Deployment
Requirements Testing
Acceptance Testing
Architecture Design
System Integration
Design Testing
System Testing
Module Design
Module Testing
Module Integration
Integration Testing
Topics in Testing
Levels of Testing
User level: requirements test, rapid prototyping,
Testing Tools
Like any other software engineering activity, the
Testing languages
Several languages are being used for writing down test
cases
Short Break!
- Motivation, definitions,
- Topics, classification, tools
Evaluation
Each yes gives you one point
Do you have a test case for an equilateral triangle?
Do you have a test case for an isoscele triangle?
(must be a triangle, not, e.g. (2,2,4))
Do you have a test case for an admissible scalene
triangle (must be a real triangle, not, e.g. (1,2,3))
Do you have at least three test cases for isoscele
triangles, where all permutations of sides are
considered? (e.g. (3,3,4), (3,4,3), (4,3,3))
Did you state for each test case the expected result?
Evaluation (2)
Do you have a test case with one side zero?
Do you have a test case with negative values?
Do you have a test case where the sum of two sides
Evaluation (3)
Do you have the test case (0,0,0)?
Do you have test cases with very large integers (maxint)?
Do you have a test case with non-integer values? (e.g., real
year
NextDate takes a date and returns the date of the
following day
Checks whether input date is valid (according to Gregorian
calender, no Feb 31st etc.)
Return value respects leap years etc.
DaysInMonth
30+((m mod 2) xor (m div 8))-n*(n==2)
if m==2 then 28
else if m<7 and even(m) or m>7 and odd(m)
then 30 else 31
if m==2 then 28
else if m in {4,6,9,11} then 30 else 31
array
DiM=[31,28,31,30,31,30,31,31,30,31,30,31]
return DiM[month]
State-transition system
not much calculation
user interaction
Client-server paradigm
Web-based, web-service
OFF
INT
INT
INT
LOW
HIGH
Dial
n/a
n/a
n/a
12
30
60
Wiper