Introduction to Software Testing
Author: Paul Ammann
Extensively class tested, this text takes an innovative approach to explaining the process of software testing: it defines testing as the process of applying a few well-defined, general-purpose test criteria to a structure or model of the software. The structure of the text directly reflects the pedagogical approach and incorporates the latest innovations in testing, including techniques to test modern types of software such as OO, web applications, and embedded software.
Table of Contents:
List of Figures ixList of Tables xiii
Preface xv
Overview 1
Introduction 3
Activities of a Test Engineer 4
Testing Levels Based on Software Activity 5
Beizer's Testing Levels Based on Test Process Maturity 8
Automation of Test Activities 10
Software Testing Limitations and Terminology 11
Coverage Criteria for Testing 16
Infeasibility and Subsumption 20
Characteristics of a Good Coverage Criterion 20
Older Software Testing Terminology 21
Bibliographic Notes 22
Coverage Criteria 25
Graph Coverage 27
Overview 27
Graph Coverage Criteria 32
Structural Coverage Criteria 33
Data Flow Criteria 44
Subsumption Relationships among Graph Coverage Criteria 50
Graph Coverage for Source Code 52
Structural Graph Coverage for Source Code 52
Data Flow Graph Coverage for Source Code 54
Graph Coverage for Design Elements 65
Structural Graph Coverage for Design Elements 65
Data Flow Graph Coverage for Design Elements 67
Graph Coverage for Specifications 75
Testing Sequencing Constraints 75
Testing State Behavior of Software 77
Graph Coverage for Use Cases 87
Use Case Scenarios 90
Representing Graphs Algebraically 91
Reducing Graphs to Path Expressions 94
Applications of Path Expressions 96
Deriving Test Inputs 96
Counting Paths in a Flow Graph and Determining Max Path Length 97
Minimum Number of Paths to Reach All Edges 98
Complementary Operations Analysis 98
Bibliographic Notes 100
Logic Coverage 104
Overview: Logic Predicates and Clauses 104
Logic Expression Coverage Criteria 106
Active Clause Coverage 107
Inactive Clause Coverage 111
Infeasibility and Subsumption 112
Making a Clause Determine a Predicate 113
Finding Satisfying Values 115
Structural Logic Coverage of Programs 120
Predicate Transformation Issues 127
Specification-Based Logic Coverage 131
Logic Coverage of Finite State Machines 134
Disjunctive Normal Form Criteria 138
Bibliographic Notes 147
Input Space Partitioning 150
Input Domain Modeling 152
Interface-Based Input domain Modeling 153
Functionality-Based Input Domain Modeling 154
Identifying Characteristics 154
Choosing Blocks and Values 156
Using More than One Input Domain Model 158
Checking the Input Domain Model 158
Combination Strategies Criteria 160
Constraints among Partitions 165
Bibliographic Notes 166
Syntax-Based Testing 170
Syntax-Based Coverage Criteria 170
BNF Coverage Criteria 170
Mutation Testing 173
Program-Based Grammars 176
BNF Grammars for Languages 176
Program-Based Mutation 176
Integration and Object-Oriented Testing 191
BNF Integration Testing 192
Integration Mutation 192
Specification-Based Grammars 197
BNF Grammars 198
Specification-Based Mutation 198
Input Space Grammars 201
BNF Grammars 201
Mutation for Input Grammars 204
Bibliographic Notes 210
Applying Criteria in Practice 213
Practical Considerations 215
Regression Testing 215
Integration and Testing 217
Stubs and Drivers 218
Class Integration Test Order 218
Test Process 219
Requirements Analysis and Specification 220
System and Software Design 221
Intermediate Design 222
Detailed Design 223
Implementation 223
Integration 224
System Deployment 224
Operation and Maintenance 224
Summary 225
Test Plans 225
Identifying Correct Outputs 230
Direct Verification of Outputs 230
Redundant Computations 231
Consistency Checks 231
Data Redundancy 232
Bibliographic Notes 233
Engineering Criteria for Technologies 235
Testing Object-Oriented Software 236
Unique Issues with Testing OO Software 237
Types of Object-Oriented Faults 237
Testing Web Applications and Web Services 256
Testing Static Hyper Text Web Sites 257
Testing Dynamic Web Applications 257
Testing Web Services 260
Testing Graphical User Interfaces 260
Testing GUIs 261
Real-Time Software and Embedded Software 262
Bibliographic Notes 265
Building Testing Tools 268
Instrumentation for Graph and Logical Expression Criteria 268
Node and Edge Coverage 268
Data Flow Coverage 271
Logic Coverage 272
Building Mutation Testing Tools 272
The Interpretation Approach 274
The Separate Compilation Approach 274
The Schema-Based Approach 275
Using Java Reflection 276
Implementing a Modern Mutation System 277
Bibliographic Notes 277
Challenges in Testing Software 280
Testing for Emergent Properties: Safety and Security 280
Classes of Test Cases for Emergent Properties 283
Software Testability 284
Testability for Common Technologies 285
Test Criteria and the Future of Software Testing 286
Going Forward with Testing Research 288
Bibliographic Notes 290
List of Criteria 293
Bibliography 295
Index 319
Interesting book: Project Study Guide or IPsec Virtual Private Network Fundamentals
Programming with QT: Writing Portable GUI Applications on Unix and Win32
Author: Matthias Kalle Dalheimer
Qt is a C++ class library for writing GUI applications that run on UNIX, Windows 95/98, and Windows NT platforms. Qt is much easier to use than the standard Motif toolkit for UNIX systems, but at the same time Qt emulates the look-and-feel of Motif. Best of all, after you have written an application with Qt, all you have to do is recompile it to have a version that works on Windows systems. Qt also emulates the look-and-feel of Windows, so you can provide all of your users with native-looking interfaces.
Platform independence is not the only benefit of Qt. Qt uses an ingenious signal/slot mechanism for connecting user interaction with program functionality, providing an excellent framework for component-based programming. Graphical rendering in Qt is highly optimized due to its use of effective caching mechanisms -- rendering in Qt is often faster than with the similar native API. In addition to user interface classes, Qt features portable support for file system access, working with date and time values, and network programming. With Qt, you'll find that you need to write very little, if any, platform-dependent code because Qt already has what you need.
Qt is popular with open-source and Linux developers because it can be used for free on UNIX systems for this type of development. For commercial development, you need a license for Qt, which is available from Troll Tech, the developers of Qt. In addition to open-source development, Qt is being used by several major companies and government and international agencies.
While programming with Qt is straightforward and feels natural once you get the hang of it, the learning curve can be steep. Qt comes with excellent reference documentation, but beginners often find the included tutorial is not enough to really get started with Qt. That is where this book steps in. Programming with Qt guides you through the steps of writing a Qt application by showing you how to write a simple paint application. It also helps deepen your understanding of the topics with exercises and fully worked out answers. The book presents all of the GUI elements in Qt, along with advice about when and how to use them, so that you can make full use of the toolkit. There's also lots of information for seasoned Qt programmers, including material on advanced 2D transformations, drag-and-drop, and writing custom image file filters.
Programming with Qt helps you get the most out of Qt. With it, you'll learn to take full advantage of this powerful, easy-to-use, cross-platform toolkit.
Electronic Review of Books - Lou Grinzo
Linux's meteoric rise in both popularity and usage is increasing the demand for solid information for programmers about all aspects of Linux development, as well as cross-platform issues. Programming with Qt, by Matthias Dalheimer, covers a tool that addresses some of the thornier topics in modern GUI programming, cross-platform application frameworks, and widget toolkits. Qt is a product of Troll Tech, and is available for both X Windows and Win32 environments. Dalheimer is a member of the board of directors of the KDE Foundation, and has considerable Qt experience, since the KDE desktop environment for Linux is based on Qt.
In the book's 25 chapters, Dalheimer provides a good overview of the Qt programming model, and presents a solid conceptual framework for any experienced programmer new to Qt. He includes several usage tips and many pieces of thoughtful advice, any one of which could easily be worth the cost of the book in the right circumstances. He also talks about some more advanced topics, such as how to deal with resizable dialogs, especially at a time when large monitors are nearly ubiquitous; portability issues; and even the pros and cons of various approaches to writing a cross-platform widget toolkit like Qt. For readers new to Qt, especially those with a Windows background, this is all useful and enlightening material.
Dalheimer takes you through the expected steps, from the obligatory "Hello, world!" program to dealing with menus, event handling, Qt's layout managers and container classes, graphics and text programming, file handling, focus issues, and interapplication communication. One of the longer chapters covers writing your own Qt widgets, and includes two extended examples that will be useful references for anyone taking on this task. Chapter 9 is one of the strongest parts of the book, in that it covers numerous graphics programming topics, such as palette management, saving and displaying graphics, double buffering, and transformations.
One area the author focuses on throughout the book, and to good effect, is Qt's use of signals and slots. (These are not traditional UNIX IPC signals, but a variation unique to Qt.) This is the technology that notifies specific parts of a program when UI events happen, such as users clicking on a button or an item in a listbox. Every application framework has its own way of performing this "plumbing," and understanding it well enough to get notifications in the right places, forward them effectively, and so on, is critical to using the framework. Dalheimer clearly appreciates this fact, and doesn't just talk about Qt's signals and slots once and then move on, but returns to the topic several times in different contexts.
Experienced programmers might raise an eyebrow over the thought of covering all this material -- an entire application framework and a widget toolkit -- in a mere 361 pages. (Petzold's Programming Windows, easily the standard in this area, is well over twice the page count in its second edition, for example, even if it does cover some topics not in Qt.) This highlights the only serious problem with this book: Its treatment of some topics is conspicuously thin. For example, the discussion of the file open/save dialogs is barely half a page of text (not counting illustrations), yet you will likely spend considerable time with these dialogs in various programs, using them in different ways. This book isn't meant to be a replacement for Troll Tech's reference manual, obviously, but several examples of how to use these dialogs with various options (multiple selection, file must exist, and the like), as well as a discussion of cross-platform issues would have been very welcome. Similarly, there are places where Dalheimer leaves pertinent questions unanswered, such as what the limit is on the number of items that a Qt listbox will handle. (He does advise against putting too many items into a listbox, for human factors reasons, which is clearly good advice, but it's critical for programmers to know what such limits are if they're to avoid exceeding them.)
I was bothered by the number of extremely short chapters. Chapter 13, "Working with Date and Time Values" is less than one page of text, Chapter 18, "Debugging" is not quite two full pages, and "Sample Qt Projects" mentions only two -- KDE and Ortho Vista -- and doesn't provide nearly the insight into real-world usage of Qt for commercial work that I'd hoped for. More serious yet is the book's almost complete avoidance of font and text output issues, something nearly all programmers will have to wrestle with.
These problems certainly don't make this a bad book, but they do make me wish for at least a few hundred more pages of the kind of work that Dalheimer is clearly capable of, to provide the fuller treatment programmers need of Qt at this time. Still, Programming with Qt, combined with the Qt reference material (freely available from the Troll Tech web site), should be enough to get experienced programmers started, while we hold out hope for a more comprehensive second edition.
No comments:
Post a Comment