ebook img

Java Testing and Design - Amazon Web Services PDF

512 Pages·2004·6.8 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Java Testing and Design - Amazon Web Services

PH069-Cohen.book Page i Monday, March 15, 2004 9:00 AM “The new software testing methods introduced in this book will show you how to form and apply effective online goal-directed design and testing techniques. You begin with your user’s goals, follow Frank’s recommendations for scalable system design, and end with powerful tests that measure your user’s success in achieving them.” —Alan Cooper, Author of About Face 2.0: The Essentials of Interaction Design and The Inmates Are Running the Asylum. He is also the father of Visual Basic “A must read for Java developers needing to deliver high-quality, scalable, and well performing production Web Services.” —Phil Goodwin, Staff Engineer, JAX Team, Sun Microsystems, Inc. “Testing, scalability, and test-driven design and methodologies are the new ‘battlefield’ of software development. Frank Cohen introduces a new methodology for designing, testing, and maintaining Web-enabled applications. This book is the best battlegear available.” —Andrew Sliwkowski, Performance Analyst, BEA Systems “Frank uses his considerable experience in information system technology to provide a view of the evolution from mainframe to Client/Server to distributed ‘n’ or ‘flapjack’ tier architectures, structured to object-oriented design, and waterfall to Agile/Scrum/XP development approaches. Now that we (as an industry) have moved toward this distributed, open environment—testing, scalability, and interoperability are the next challenges, and Frank’s book is an excellent introduction.” —Ed Hunter, SunOne Performance Team, Sun Microsystems, Inc. “The book is an excellent presentation of metrics and measurement approaches to harnessing and calculating performance and functionality when working with Web-enabled applications, especially Web Services. The book’s emphasis on user archetypes to drive otherwise headless testing agents is a key point.” —Bret Pettichord, Software Testing and Test Automation Guru for IBM/Tivoli, BMC, Segue, Interleaf; and co-author of Lessons Learned in Software Testing “Frank Cohen’s new book takes a theoretical, didactic, and empirical approach to attacking this issue and does a fantastic job at bringing both the novice and expert from the ‘what and why’ to the ‘how’ of software testing design, automation, and scalability/reusability.” —Christian J. Hessler Staff Engineer, Sun Microsystems, Inc. “An unequaled achievement in clarity of Java testing, design, and optimization. To avoid hard-to- trace scalability and performance ‘gotchas’ inherent in early Java development, this book is for you!” —Farooq Khan, Software Development Manager, 2Wire Inc. “What I liked most about this book was the confidence with which Cohen presents a wide range of topics: objects, tests, architecture, frameworks, and design—all the right stuff for a software developer, QA technician, and IT manager.” —Rossana Muriel, Director of Quality, Advise & Services, AMP Global Assets Management PH069-Cohen.book Page ii Monday, March 15, 2004 9:00 AM PH069-Cohen.book Page iii Monday, March 15, 2004 9:00 AM Java Testing ™ and Design From Unit Testing to Automated Web Tests Frank Cohen PRENTICE HALL PROFESSIONAL TECHNICAL REFERENCE UPPERP RSAEDNDTILCEE RHIVAELRL ,P NTJR 07458 UPPER SWAWDWD.LPEH PRTIRVE.CRO, MNJ 07458 WWW.PHPTR.COM PH069-Cohen.book Page iv Monday, March 15, 2004 9:00 AM To Lorette—truly, deeply, madly ❖ ❖ ❖ A CIP catalog reference for this book can be obtained from the Library of Congress Editorial/Production Supervision: MetroVoice Publishing Services Executive Editor: Greg Doench Marketing Manager: Chris Guzikowski Manufacturing Manager: Alexis Heydt-Long Cover Designer: Nina Scuderi Cover Design Director: Jerry Votta Series Designer: Gail Cocker-Bogusz Full-Service Project Manager: Anne R. Garcia © 2004 by Pearson Education, Inc. Publishing as Prentice Hall Professional Technical Reference Upper Saddle River, New Jersey 07458 Prentice Hall PTR offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales. For more information, please contact: U.S. Corporate and Government Sales, 1-800-382-3419, [email protected]. For sales outside of the U.S., please contact: International Sales, 1-317-581-3793, [email protected]. All company and product names mentioned herein are the trademarks or registered trademarks of their respective owners. All rights reserved. No part of this book may be reproduced, in any form or by any means, without permission in writing from the publisher. Printed in the United States of America First Printing ISBN 0-13-142189-1 Pearson Education LTD. Pearson Education Australia PTY, Limited Pearson Education Singapore, Pte. Ltd. Pearson Education North Asia Ltd. Pearson Education Canada, Ltd. Pearson Educación de Mexico, S.A. de C.V. Pearson Education—Japan Pearson Education Malaysia, Pte. Ltd. PH069-Cohen.book Page v Monday, March 15, 2004 9:00 AM Contents Chapter Foreword xiii Preface xv Acknowledgments xix PART I Gauging Web-Enabled Applications CHAPTER 1 The Forces at Work Affecting Your Web-Enabled Software 1 The First Three Axioms 2 Web-Enabled Applications, the New Frontier 4 Why Writing High-Quality Software Today Is Hard 10 The Myth of Version 2.0 Solidity 11 Management’s Quest for Grail 12 Trying for Homogeneity When Heterogeneity Rules 15 The Language of Bugs 17 The Evil Twin Vice Presidents Problem 18 A Concise History of Software Development 19 Web-Enabled Applications 20 Test Paradigms and Lifecycle Processes 22 Testing Methods 25 Click-Stream Testing 26 Unit Testing 27 Functional System Testing 28 Scalability and Performance Testing 30 Quality of Service Testing 30 v PH069-Cohen.book Page vi Monday, March 15, 2004 9:00 AM vi Contents Defining Test Agents 30 Scalability and Performance Testing with Test Agents 33 Testing for the Single User 35 Creating Intelligent Test Agents 38 Automated Testing 39 Summary 39 CHAPTER 2 When Application Performance Becomes a Problem 41 Just What Are Criteria? 41 Defining Criteria for Good Web Performance 44 Are the Features Working? 46 Is Performance Acceptable? 46 How Often Does It Fail? 46 Web-Enabled Application Measurement Tools 46 The Web Rubric 47 The Four Tests of Good Performance 49 Components of a Good Test Agent 50 Web-Enabled Application Types 51 The Web-Enabled Application Points System (WAPS) 53 The Web-Enabled Application’s Framework 57 The Flapjacks Architecture 57 Adopting Flapjacks and Intelligent Test Agents 59 Building Intelligent Test Agents in a Flapjacks Environment 64 Script Languages and Test Agents 66 Generating Meaningful Data 75 Summary 76 CHAPTER 3 Modeling Tests 77 Modeling User Behavior for Meaningful Test Results 78 Lifecycles, Projects, and Human Nature 80 The Micromax Lifecycle 83 Categorizing Problems 83 Prioritizing Problems 85 Reporting Problems 86 Criteria for Evaluating Problems 86 Considerations for Web-Enabled Application Tests 87 Functionality and Scalability Testing 87 Functional Testing 90 PH069-Cohen.book Page vii Monday, March 15, 2004 9:00 AM Contents vii Scalability Testing 91 Testing Modules for Functionality and Scalability 92 Management Styles 99 Service Level Agreements 101 Grid Computing and Intelligent Agents 104 The Road to Easy Setup, Use, and Maintenance 105 Self-Healing Systems 106 Understanding Performance and Scalability Criteria 108 Defining SPC 108 SPC in Action 111 Modeling a User’s Goals 115 Test States 117 Using UML and Code Comments to Model Tests 118 Putting the Test Together 119 Summary 120 CHAPTER 4 Java Development and Test Automation Tools 121 The Three Waves 122 Desktop Application Development and Test Automation 122 Client/Server Development and Test Automation 124 Web-Enabled Development and Test Automation 127 Achieving the Troika—the Fourth Wave 131 A Test Automation Lifecycle 133 Summary 137 CHAPTER 5 Bridging from Methodology to Design 139 Searching for Tools to Enable the Troika 140 How to Get TestMaker 144 TestMaker and the Open Source Process 145 Spending Five Minutes with TestMaker 146 Installing TestMaker on a Windows or Linux Computer 147 Running TestMaker 148 Getting to Know the TestMaker Graphic Environment 148 Opening and Running Test Agents 150 Building Agents with the New Agent Wizard 153 Why I Like Jython 162 1. Jython Is Quick 163 2. Data Structures and List Iteration Come for Free 163 3. Dynamic Variables with Automatic Typing 164 4. Functions Are First Class 164 PH069-Cohen.book Page viii Monday, March 15, 2004 9:00 AM viii Contents 5. Java Integration 165 6. Bean Property Introspection 165 7. Sun Is Adopting Scripting in Java 166 Using Jython to Incorporate JUnit 166 JUnit for Repeatable Tests 166 A JUnit Example 167 JUnit and TestMaker 169 Summary 172 PART II Components, Interoperability, and Optimization CHAPTER 6 Design and Test in HTTP/HTML Environments 173 The HTTP/HTML Environment 174 What Usually Goes Wrong 177 Compliance, As in Non, and Browser Caching 177 Invalid Data 179 Session Problems 181 Constructing HTTP Test Agents 181 Hands-On HTTP Communication 184 Understanding Cookies, Sessions, and Redirection 193 Validating Response Data 203 Summary 214 CHAPTER 7 Tuning SOAP and XML Web Services 217 The Web Services Vision 218 XML-RPC for Web Interoperability 221 Where XML-RPC Falls Short 227 Universal Interoperability with SOAP 227 Web Service Scalability Techniques 229 Web Service Interoperability Problems 231 Discovery 232 Definition 232 Request/Response 234 On the Horizon 237 Using TestMaker to Understand WSDL 237 Constructing SOAP Calls 242 Different Types of SOAP Calls 245 PH069-Cohen.book Page ix Monday, March 15, 2004 9:00 AM Contents ix Validating Response Data 254 Making It Easier to Write Agents 255 Resources 255 Summary 256 CHAPTER 8 State, Design, and Testing 257 A Question of State 257 Lifecycle for Testing Stateful Systems 261 Techniques to Establish State 263 Preparation and Setup Agents 267 Setup_agent 273 Using Databases to Configure Tests 280 Using Lingo to Make Test Content Close to Real 286 Summary 291 CHAPTER 9 Integrating with .NET Web Services 293 Interoperability and Integration 295 How Is .NET Different? 297 Document-Style Scalability 300 SOAP Headers in .NET 302 WSDL .NET Style 304 A Test Agent for .NET Environments 307 Near Term Considerations 315 Summary 316 CHAPTER 10 Building and Testing Intranets and Secure Environments 319 Getting a Head Start 319 Security by Routing 320 Virtual Private Networks 322 Network Segments and Subnets 323 Transport Security 325 SOAP over SSL 330 .NET Passport Authentication 331 HTTP Basic Authentication 332 SOAP and Security 333 PH069-Cohen.book Page x Monday, March 15, 2004 9:00 AM x Contents Generating Certificates and KeyStores 336 The Java Keytool 339 Summary 341 CHAPTER 11 A Web Application Framework from Construction to Test 343 The Trading Desk and Intelligent Test Agents 343 Scalability Test Goals 344 System Infrastructure 345 User Archetypes 348 Understanding the Test Requirements 350 Constructing the Test 352 Implementing User Archetypes in Code Modules 356 Implementing the Master Component 365 Setup 366 Run 368 Cleanup 371 Property Files for Test Configuration 371 Implementing the Logging Component 372 Avoiding Test Scalability Problems 374 A First Look at the Results 376 Summary 377 CHAPTER 12 Turning Test Agent Results into Actionable Knowledge 379 What to Expect from Results Analysis 380 Goal: Our New Web Site Needs to Handle Peak Loads of 50 Concurrent Users 381 Goal: The Web Site Registration Page Needs to Work Flawlessly 381 Goal: Customer Requests for Month-End Reports Must Not Slow Down the Order-Entry Service 382 Goal Summary 383 The Big Five Problem Patterns 383 Resource Problems 383 Concurrency Problems 384 Component Problems 386 Contention Problems 387 Crash Recovery Problems 388 Key Factors in Results Analysis 389 Scenarios Where Results Data Misleads 391 The Node Problem 391 The Hidden Error 392

Description:
to Automated Web Tests Frank Cohen PH069-Cohen.book Page iii Monday, agents are important to ensuring the Web service test criteria is tested correctly.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.