Record:   Prev Next
Author Peters, Lindsay
Title Swing Extreme Testing
Imprint Olton : Packt Publishing, Limited, 2008
©2008
book jacket
Edition 1st ed
Descript 1 online resource (374 pages)
text txt rdacontent
computer c rdamedia
online resource cr rdacarrier
Note Intro -- Swing Extreme Testing -- Table of Contents -- Swing Extreme Testing -- Credits -- About the Authors -- About the Reviewers -- Preface -- What This Book Offers -- Roadblocks to Testing -- Roadblock 1: Last on the Waterfall -- Roadblock 2: Testing should be Done by Someone Else -- Roadblock 3: It's Too Hard to Test User Interfaces -- Roadblock 4: It's Too Hard to Develop and Maintain Test Code -- Roadblock 5: It's Too Expensive to Run Tests Often -- Roadblock 6: It's More Interesting to Develop "Real" Code -- Overview -- Examples and Code -- LabWizard -- Ikon Do It -- GrandTestAuto -- Source code -- What You Need For This Book -- Who Is This Book For -- Conventions -- Reader Feedback -- Customer Support -- Downloading the Example Code for the Book -- Errata -- Questions -- 1. What Needs Testing? -- An Example -- What Classes Do We Test? -- Test First-Always! -- What Classes Don't We Test? -- What Methods Need Testing? -- What Methods Don't We Test? -- Invoking Hidden Methods and Constructors -- Unit Test Coverage -- Who Should Implement the Unit Tests? -- What About Legacy Code? -- Where Does Integration Testing Fit In? -- Documentation of Unit Tests -- Testing at the Application Level -- Who Should Implement the Function Tests? -- Automated Test Execution -- A Hierarchy of Tests -- What Language Should Our Tests Be In? -- Is it Really Possible? -- Summary -- 2. Basics of Unit Testing -- A Simple Example -- The Default Implementation -- Test Cases -- Design by Contract and Non-Defensive Programming -- Test Code Example -- Bootstrapping Our Implementation -- Load Testing -- Summary -- 3. Infrastructure for Testing -- Where Should the Unit Tests Go? -- Where Should the Function and Load Tests Go? -- Management of Test Data -- What Do We Require of a Test Data Management System? -- Temporary Files -- Summary -- 4. Cyborg-a Better Robot
The Design of Cyborg -- Using the Keyboard -- Mousing Around -- Checking the Screen -- Summary -- 5. Managing and Testing User Messages -- Some Problems with Resource Bundles -- A Solution -- The UserStrings Class -- ResourcesTester -- How ResourcesTester Works -- Getting More from UserStrings -- Summary -- 6. Making Classes Testable with Interfaces -- The LabWizard Comment Editor -- The Wizard -- A Test for Wizard -- A Test for Step -- Handlers in LabWizard -- Summary -- 7. Exercising UI Components in Tests -- The LabWizard Login Screen -- The Design of LoginScreen -- UI Wrappers -- The Correct Implementation of UILoginScreen -- A Handler Implementation for Unit Testing -- Setting Up our Tests -- Our First Test -- Further Tests -- Some Implicit Tests -- Other User Interfaces -- Summary -- 8. Showing, Finding, and Reading Swing Components -- Setting Up User Interface Components in a Thread-Safe Manner -- Finding a Component -- Testing Whether a Message is Showing -- Searching for Components by Name -- Reading the State of a Component -- Case Study: Testing Whether an Action Can Be Cancelled -- The Official Word on Swing Threading -- Summary -- 9. Case Study: Testing a 'Save as' Dialog -- The Ikon Do It 'Save as' Dialog -- Outline of the Unit Test -- UI Helper Methods -- Dialogs -- Getting the Text of a Text Field -- Frame Disposal -- Unit Test Infrastructure -- The UISaveAsDialog Class -- The ShowerThread Class -- The init() Method -- The cleanup() Method -- The Unit Tests -- The Constructor Test -- The wasCancelled() Test -- The name() Test -- The show() Test -- The Data Validation Test -- The Usability Test -- Summary -- 10. More Techniques for Testing Swing Components -- Testing with JColorChooser -- Using JFileChooser -- Checking that a JFileChooser has been Set Up Correctly -- Testing the Appearance of a JComponent -- Testing with Frames
Frame Location -- Frame Size -- Testing with Lists -- List Selection Methods -- List Rendering -- List Properties -- Testing a JTable -- Testing with JMenus -- Checking the Items -- Using Menus with Cyborg -- Testing JPopupMenus -- Combo Boxes -- Progress Bars -- JSlider and JSpinner -- JTree -- Summary -- 11. Help! -- Overview -- What Tests Do We Need? -- An HTML File That is Not Indexed -- An index item for which there is no HTML file -- Broken links -- Incorrectly titled help pages -- Creating and Testing Context-Sensitive Help -- Executing HelpGenerator -- Summary -- 12. Threads -- The Waiting Class -- Concurrent Modifiers -- Concurrent Readers and Writers -- Proof of Thread Completion -- The Unit Test for waitForNamedThreadToFinish() -- Counting Threads -- Summary -- Further Reading -- 13. Logging -- Logging to a File -- Remember to Roll! -- Testing What is Printed to the Console -- Switching Streams -- Reading the Output From a Second JVM -- Summary -- 14. Communication with External Systems -- Email -- Using an External Email Account -- Using a Local Email Server -- Which Method is Best? -- Testing Spreadsheets -- PDF -- Serialization -- Files -- Summary -- 15. Embedding User Interface Components in Server-side Classes -- A Typical MVC System -- The Problem -- The Solution -- Which Approach Should We Use? -- Summary -- 16. Tests Involving Databases -- A Uniform Approach to Accessing the Database -- Persistence Testing -- Database Management -- Summary -- 17. Function Tests -- Specification of the Tests -- Implementation of the 'DeleteCase' Test -- Tests Involving Multiple JVMs -- Multiple JVMs with GUI Components -- Use of a Function Test as a Tutorial -- Testing a Web Service -- Summary -- 18. Load Testing -- What to Test -- Overnight 'Housekeeping' Takes Too Long -- Deleting Cases Takes Too Long -- The BMD Server is Too Slow to Start
Measuring Time -- Measuring RAM Usage -- The Load Tests for LabWizard -- Profilers and Other Tools -- Summary -- 19. GrandTestAuto -- What is GrandTestAuto? -- Unit Test Coverage -- Advantages of Using GTA -- Getting Started -- Testing Overloaded Methods -- Testing Protected Methods -- Extra Tests -- Classes That Do Not Need Tests -- Day-To-Day Use of GrandTestAuto -- Running Just One Level of Test -- Running the Unit Tests for a Single Package -- Running the Unit Tests for a Single Class -- Running the Tests for a Selection of Packages -- Package Name Abbreviation -- Running Tests for a Selection of Classes Within a Single Package -- Running Individual Test Methods -- Running GTA From Ant or CruiseControl -- GTA Parameters -- Distributed Testing Using GTA -- How it Works-In Brief -- A Distributed Testing Example -- Summary -- 20. Flaky Tests -- A Flaky 'Ikon Do It' Unit Test -- Writing Reliable Tests -- Dealing with Flaky Tests -- Diagnostic Tools -- Tests That Do Not Terminate -- Non-Daemon Threads -- Remote Objects -- Server Socket Still Waiting -- Frame Not Properly Disposed -- Summary -- Index
The Extreme approach to complete Java application testing
Description based on publisher supplied metadata and other sources
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2020. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries
Link Print version: Peters, Lindsay Swing Extreme Testing Olton : Packt Publishing, Limited,c2008 9781847194824
Subject Software architecture -- Congresses.;Computer software -- Development -- Congresses
Electronic books
Alt Author Lavers, Tim
Record:   Prev Next