Usually by choosing representatives of classes that are apt to fail often ...
Example: Java class “roots” applies quadratic equation ... Ch 10, slide 8. The
partition ...
and Pezze + Young, “Software Testing ... Note that in 900 million years, due to
increase of ..... Figure 14.3 State diagram for Account class (adapted from [KIR94]
).
Testing Electronic. Components. Brought to you by Jestine Yong http://www.
ElectronicRepairGuide.com http://www.TestingElectronicComponents.com.
Android, Flex and Web Based Software and Quality Assurance Testing. My technological for testing is .... EDU. (UBTER). N
Test Automation using HP Unified Functional Testing. All rights reserved. No
parts of this publication may be reproduced, stored in a retrieval system, or ...
Sep 18, 2013 - A fitting framework [11, 9] for the definition of abstract data- types is that of algebraic specification
Sep 18, 2013 - In Andy Gill and Jurriaan Hage, editors, Implemen- tation and Application of Functional Languages, 23rd Inter- national Symposium, IFL 2011, ...
Sep 18, 2013 - Acta Informatica, 10:27â52,. 1978. [12] Richard Hamlet. Random testing. In John J. Marciniak, ed- itor,
Software Tools for Technology Transfer manuscript No. (will be inserted by the ... We focus on fully automated testing techniques includ- ing blackbox and glassbox test ... ability), such as security levels, performance, etc. The availability of test
1. Abstract testing and concrete testers. Marc Phalippou 1. FRANCE TELECOM-
CNET. Abstract : it is common practice in testing to extract from the complete ...
Mar 22, 1999 - Object-oriented programming is as much a different way of designing programs as it is a ..... Most application classes do little besides define the class of their ... Other frameworks include the Lisa Toolkit [Apple 1984], which was us
Palo Alto, CA 94304 www.hp.com. HP Unveils Integrated Automated Testing
Solution for Composite Applications. Improves quality of complex applications.
Mar 30, 2010 - example the push operations yields a new stack whose sequence query .... Table 1: Snippets from the EiffelBase classes LINKED LIST (lines ...... + old other.count is in particular satisfied as count is updated anyway (line.
The new HP Unified Functional Testing software, one of the solutions added to the HP ... 2010 Hewlett-Packard Developmen
Mar 30, 2010 - arXiv:1003.5777v1 [cs.SE] 30 Mar 2010. Specifying Reusable Components. Nadia Polikarpova. Carlo A. Furia. Bertrand Meyer. Abstract.
either done in an ad-hoc manner at the very small scale or as part ... subject to composition by a third party. Meyer [4] described ... Mohammed K. Nour. Collage ...
The inclusion of concurrency in Ada leads to multiple reusable components ... The proposed modifications of Ada 9X contain features which may eliminate th e.
Testing process is an important issue in software development. It represents ..... aspects, where the billing feature depends upon the timing feature. It constitutes ...
HP Unified Functional Testing. Software Version: 11.50. Enter the operating
system(s), e.g. Windows ®. API Testing Tutorial. Document Release Date: ...
venient and irrelevant to test an entire structural frame or assemblage. .... a given axial load a suitable condition is prov~ded by a checker-board load distribution.
A Framework for Testing Object-Oriented Components ... is true of middleware architectures that support the deployment of components, such as Java Beans [3], .... At the opposite extreme, we only exercise each method sequence of the client ...
Improve system environment including field data entry capabilities and online, configurable, multi-tiered access. Improv
Ana C. R. Paiva, JoÑo C. P. Faria, and Raul F. A. M. Vidal. Abstract â It is .... requires some sort of formal specification of the software to be tested, that can be ...
It should also have an abstract Factory. Method for creating instances of the class
to be tested. 7. Example abstract test class public abstract TestStatPak extends ...
Abstract classes cannot be instantiated However, they define an interface and behaviour (contracts) that implementing classes will have to adhere to We would like to test abstract classes for
functional compliance
Textbook Reading: Chapter 11
Functional Compliance is a module's compliance with some documented or published functional specification 2
Functional vs. syntactic compliance
The compiler can easily test that a class is syntactically compliant to an interface
This pattern provides the following
All methods in the interface have to be implemented with the correct signature
Tougher to test functional compliance
Abstract Test Pattern
A class implementing java.util.List may be implementing add(Object o) or get(int x) incorrectly
A way to build a test suite that can be reused across descendants A test suite that can be reused for future as-yet-unidentified descendants
Especially useful for writers of APIs.
Think LSP… 3
4
1
An example
Abstract Test Rule 1
Consider a statistics application that uses the Strategy design pattern
public interface StatPak { public void reset(); public void addValue(double x); public double getN(); public double getMean(); public double getStdDev(); }
Write an abstract test class for every interface and abstract class An abstract test should have test cases that cannot be overridden It should also have an abstract Factory Method for creating instances of the class to be tested.
5
6
Example abstract test class
Example abstract test class
public abstract TestStatPak extends TestCase { private StatPak statPak; // final to prevent overriding public final setUp() throws Exception { statPak = createStatPak(); assertNotNull(statPak); } // Factory Method. Every test class of a // concrete subclass K must override this // to return an instance of K public abstract StatPak createStatPak(); //Continued in next slide… 7
public final void testMean() { statPak.addValue(2.0); statPak.addValue(3.0); statPak.addValue(4.0); statPak.addValue(2.0); statPak.addValue(4.0); assertEquals("Mean value of test data should be 3.0", 3.0,statPak.getMean()); } public final void testStdDev() { ... } } 8
2
Abstract Test Rule 2
Example concrete test class public class TestSuperSlowStatPak extends TestStatPak {
Write a concrete test class for every implementation of the interface (or abstract class) The concrete test class should extend the abstract test class and override the factory method
public StatPak createStatPak() { return new SuperSlowStatPak(); } } Only a few lines of code and all the test cases for the interface have been reused
9
Guideline
Testing generic classes
Tests defining the functionality of the interface belong in the abstract test class Tests specific to an implementation belong in a concrete test class
10
Not all languages support genericity
Issues to address
We can add more test cases to TestSuperSlowStatPak that are specific to its implementation
11
C++ has templates, Eiffel has full genericity Java does not (maybe in the future?) Which type parameters to test? How many type parameters to test? What kind of tests should we create? 12
3
Fault model
What type parameters to test?
Unintended interactions between the generic class and the type parameter Type parameter classes may differ in
Try parameters that might give different boundary cases
Range and precision of scalar types Implementation of equals or copy Initialization assumptions Side effects Thread safety