SW-Testing FS2011 Introduction
SW-Testing FS2011 Introduction
Introduction
Beat Fluri
Exercises
Teams of two
Grade
Wirten or oral exam depending on the number of course participants
During a course
Discussion of topics (summary of reading)
Presentation of a possible solution for the exercises
Information for upcoming exercise
http://easytesting.org
http://java-source.net/open-source/testing-tools
Dr. Beat Fluri © 2011 4
Content (tentative)
Test-Driven Development (TDD)
JUnit and Eclipse
Unit Testing
Testing smallest units (in isolation if possible)
Continuous Integration
One environment to build and test the application
Multi-stage builds for rapid feedback
Integration Testing
Testing interaction between components (compounds of units)
Regression Testing
How to choose system tests for regression
Execution sequences
Test suite
Set of test cases, usually related to a testing goal
Test driver
Class or utility program that applies test cases
Stub
Partial, temporary implementation of a component
Test harness
Substitution for parts of the deployment environment, i.e., a system of test drivers
and other tools to support test execution
Dr. Beat Fluri © 2011 15
Short glossary
Oracle
A mechanism to evaluate the actual result of a test case as pass or no pass
Equivalence class
Set of input values: if one value is processed correctly/incorrectly, all other values will
also be processed correctly/incorrectly
Coverage
Percentage of elements required by a test strategy that have been exercised by a
given test suite
Test model
Testable representation of the relationships among elements of an implementation
based on a fault model
Test strategy
Algorithm or heuristic to create test cases from an implementation or test model
Test design
Produces a test suite using a test strategy: identification of interesting test inputs,
placing these test inputs into a sequence, and defining the expected results
Conformance-directed testing
Testing that seeks to establish conformance to requirements or specifications
System Test
Integration Test
Subsystem
Subsystem
Design/Spec
Unit Test
Unit
Unit
Design/Spec
User
needs Validation Delivery
Subsystem
Design/Spec Verification Subsystem
Unit
Unit
Design/Spec
Test(s)
Run all tests Refactor
succeed
Repeat
(x0,y0)
scalene isosceles equilateral
Download assignment_0.jar
LineSegment and Triangle classes
Download assignment_0-javadoc.jar
Javadoc for LineSegment and Triangle classes