Groovy in Action.Pdf

Total Page:16

File Type:pdf, Size:1020Kb

Groovy in Action.Pdf Groovy in Action Groovy in Action DIERK KÖNIG WITH ANDREW GLOVER, PAUL KING GUILLAUME LAFORGE, AND JON SKEET MANNING Greenwich (74° w. long.) For online information and ordering of this and other Manning books, please go to www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact: Special Sales Department Manning Publications Co. Cherokee Station PO Box 20386 Fax: (609) 877-8256 New York, NY 10021 email: [email protected] ©2007 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books they publish printed on acid-free paper, and we exert our best efforts to that end. Manning Publications Co. Cherokee Station Copyeditor: Benjamin Berg PO Box 20386 Typesetter: Denis Dalinnik New York, NY 10021 Cover designer: Leslie Haimes ISBN 1-932394-84-2 Printed in the United States of America 1 2 3 4 5 6 7 8 9 10 – MAL – 10 09 08 07 06 To the love of my life —D.K. brief contents 1 ■ Your way to Groovy 1 PART 1 THE GROOVY LANGUAGE ...................................... 27 2 ■ Overture: The Groovy basics 29 3 ■ The simple Groovy datatypes 55 4 ■ The collective Groovy datatypes 93 5 ■ Working with closures 122 6 ■ Groovy control structures 153 7 ■ Dynamic object orientation, Groovy style 174 PART 2 AROUND THE GROOVY LIBRARY ........................ 227 8 ■ Working with builders 229 9 ■ Working with the GDK 277 10 ■ Database programming with Groovy 323 11 ■ Integrating Groovy 360 12 ■ Working with XML 401 vii viii BRIEF CONTENTS PART 3 EVERYDAY GROOVY ............................................ 451 13 ■ Tips and tricks 453 14 ■ Unit testing with Groovy 503 15 ■ Groovy on Windows 546 16 ■ Seeing the Grails light 572 appendix A ■ Installation and documentation 606 appendix B ■ Groovy language info 610 appendix C ■ GDK API quick reference 613 appendix D ■ Cheat sheets 631 contents foreword xix preface xx acknowledgments xxiii about this book xxv about the authors xxix about the title xxxii about the cover illustration xxxiii Your way to Groovy 1 1 1.1 The Groovy story 3 What is Groovy? 4 ■ Playing nicely with Java: seamless integration 4 ■ Power in your code: a feature-rich language 6 Community-driven but corporate-backed 9 1.2 What Groovy can do for you 10 Groovy for Java professionals 10 ■ Groovy for script programmers 11 ■ Groovy for pragmatic programmers, extremos, and agilists 12 1.3 Running Groovy 13 Using groovysh for “Hello World” 14 ■ Using groovyConsole 17 ■ Using groovy 18 ix x CONTENTS 1.4 Compiling and running Groovy 19 Compiling Groovy with groovyc 19 ■ Running a compiled Groovy script with Java 20 ■ Compiling and running with Ant 21 1.5 Groovy IDE and editor support 22 IntelliJ IDEA plug-in 23 ■ Eclipse plug-in 24 Groovy support in other editors 24 1.6 Summary 25 PART 1 THE GROOVY LANGUAGE ..................................... 27 Overture: The Groovy basics 29 2 2.1 General code appearance 30 Commenting Groovy code 30 ■ Comparing Groovy and Java syntax 31 ■ Beauty through brevity 32 2.2 Probing the language with assertions 33 2.3 Groovy at a glance 36 Declaring classes 36 ■ Using scripts 37 ■ GroovyBeans 38 Handling text 39 ■ Numbers are objects 40 ■ Using lists, maps, and ranges 41 ■ Code as objects: closures 43 Groovy control structures 46 2.4 Groovy’s place in the Java environment 47 My class is your class 47 ■ GDK: the Groovy library 49 The Groovy lifecycle 50 2.5 Summary 53 The simple Groovy datatypes 55 3 3.1 Objects, objects everywhere 56 Java’s type system—primitives and references 56 Groovy’s answer—everything’s an object 57 Interoperating with Java—automatic boxing and unboxing 59 No intermediate unboxing 60 3.2 The concept of optional typing 61 Assigning types 61 ■ Static versus dynamic typing 62 3.3 Overriding operators 63 Overview of overridable operators 63 ■ Overridden operators in action 65 ■ Making coercion work for you 67 CONTENTS xi 3.4 Working with strings 69 Varieties of string literals 69 ■ Working with GStrings 72 From Java to Groovy 74 3.5 Working with regular expressions 76 Specifying patterns in string literals 78 ■ Applying patterns 81 Patterns in action 82 ■ Patterns and performance 85 Patterns for classification 86 3.6 Working with numbers 87 Coercion with numeric operators 87 GDK methods for numbers 90 3.7 Summary 91 The collective Groovy datatypes 93 4 4.1 Working with ranges 94 Specifying ranges 95 ■ Ranges are objects 97 Ranges in action 98 4.2 Working with lists 100 Specifying lists 100 ■ Using list operators 101 Using list methods 104 ■ Lists in action 109 4.3 Working with maps 111 Specifying maps 111 ■ Using map operators 113 Maps in action 117 4.4 Notes on Groovy collections 119 Understanding concurrent modification 119 Distinguishing between copy and modify semantics 120 4.5 Summary 121 Working with closures 122 5 5.1 A gentle introduction to closures 123 5.2 The case for closures 125 Using iterators 125 ■ Handling resources 127 5.3 Declaring closures 130 The simple declaration 130 ■ Using assignments for declaration 131 ■ Referring to methods as closures 131 Comparing the available options 133 xii CONTENTS 5.4 Using closures 135 Calling a closure 135 ■ More closure methods 137 5.5 Understanding scoping 141 The simple variable scope 142 ■ The general closure scope 143 Scoping at work: the classic accumulator test 146 5.6 Returning from closures 148 5.7 Support for design patterns 149 Relationship to the Visitor pattern 149 ■ Relationship to the Builder pattern 150 ■ Relationship to other patterns 151 5.8 Summary 151 Groovy control structures 153 6 6.1 The Groovy truth 154 Evaluating Boolean tests 154 ■ Assignments within Boolean tests 156 6.2 Conditional execution structures 158 The humble if statement 158 ■ The conditional ?: operator 159 ■ The switch statement 160 Sanity checking with assertions 163 6.3 Looping 167 Looping with while 167 ■ Looping with for 168 6.4 Exiting blocks and methods 170 Normal termination: return/break/continue 170 Exceptions: throw/try-catch-finally 171 6.5 Summary 172 Dynamic object orientation, Groovy style 174 7 7.1 Defining classes and scripts 175 Defining fields and local variables 176 ■ Methods and parameters 180 ■ Safe dereferencing with the ?. operator 184 Constructors 185 7.2 Organizing classes and scripts 188 File to class relationship 188 ■ Organizing classes in packages 190 ■ Further classpath considerations 194 7.3 Advanced OO features 195 Using inheritance 195 ■ Using interfaces 196 Multimethods 197 CONTENTS xiii 7.4 Working with GroovyBeans 199 Declaring beans 200 ■ Working with beans 201 Using bean methods for any object 205 Fields, accessors, maps, and Expando 206 7.5 Using power features 207 Querying objects with GPaths 208 ■ Injecting the spread operator 212 ■ Mix-in categories with the use keyword 213 7.6 Meta programming in Groovy 216 Understanding the MetaClass concept 216 ■ Method invocation and interception 218 ■ Method interception in action 220 7.7 Summary 224 PART 2 AROUND THE GROOVY LIBRARY........................... 227 Working with builders 229 8 8.1 Learning by example—using a builder 231 8.2 Building object trees with NodeBuilder 234 NodeBuilder in action—a closer look at builder code 235 Understanding the builder concept 237 ■ Smart building with logic 237 8.3 Working with MarkupBuilder 239 Building XML 240 ■ Building HTML 241 8.4 Task automation with AntBuilder 243 From Ant scripts to Groovy scripts 243 ■ How AntBuilder works 245 ■ Smart automation scripts with logic 246 8.5 Easy GUIs with SwingBuilder 247 Reading a password with SwingBuilder 248 ■ Creating Swing widgets 250 ■ Arranging your widgets 254 ■ Referring to widgets 257 ■ Using Swing actions 260 ■ Using models 262 ■ Putting it all together 264 8.6 Creating your own builder 271 Subclassing BuilderSupport 272 The DebugBuilder example 274 8.7 Summary 276 xiv CONTENTS Working with the GDK 277 9 9.1 Working with Objects 278 Interactive objects 279 ■ Convenient Object methods 285 Iterative Object methods 288 9.2 Working with files and I/O 291 Traversing the filesystem 294 ■ Reading from input sources 295 ■ Writing to output destinations 297 Filters and conversions 298 ■ Streaming serialized objects 300 9.3 Working with threads and processes 301 Groovy multithreading 302 Integrating external processes 304 9.4 Working with templates 309 Understanding the template format 309 ■ Templates in action 310 ■ Advanced template issues 312 9.5 Working with Groovlets 314 Starting with “hello world” 314 ■ The Groovlet binding 316 Templating Groovlets 319 9.6 Summary 321 Database programming with Groovy 323 10 10.1 Basic database operations 325 Setting up for database access 325 ■ Executing SQL 329 Fetching data 334 ■ Putting it all together 338 10.2 DataSets for SQL without SQL 340 Using DataSet operations 341 ■ DataSets on database views 344 10.3 Organizing database work 347 Architectural overview 347 ■ Specifying the application behavior 349 ■ Implementing the infrastructure 350 Using a transparent domain model 355 ■ Implementing
Recommended publications
  • PHP String Interview Questions
    By OnlineInterviewQuestions.com String Interview Questions in PHP Q1. What is String in PHP? The String is a collection or set of characters in sequence in PHP. The String in PHP is used to save and manipulate like an update, delete and read the data. Q2. How to cast a php string to integer? The int or integer used for a variable into an integer in PHP. Q3. How to perform string concatenation in PHP? The string concatenation means two strings connect together. The dot ( . ) sign used in PHP to combine two string. Example:- <?php $stringa = " creative "; $stringb = "writing "; echo $stringa . $stringb; ?> Q4. How to get php string length? To determine the string length in PHP, strlen() function used. Example:- echo strlen(“creative writing”); Q5. List some escape characters in PHP? Some list escape characters in PHP there are:- \’ \” \\ \n \t \r Q6. How to convert special characters to unicode in php? There is function json_encode() which is converted special characters to Unicode in PHP. Example:- $stringa = " I am good at smiling"; print_r(json_encode($stringa)); Q7. How to add double quotes in string in php? The double quotes in string using (" ") sign and write content under this sign. The double quotes convert variable as value. An example is below:- $str8 = " need to read data where has to go "; echo $str 8output: double quotes in the string echo “ PHP work $str8 output: PHP work need to read data where has to go Q8. Explain how php string interpolation is done? The interpolation is adding variables in among a string data. PHP parses the interpolate variables and replaces this variable with own value while processing the string.
    [Show full text]
  • Coding 101: Learn Ruby in 15 Minutes Visit
    Coding 101: Learn Ruby in 15 minutes Visit www.makers.tech 1 Contents 2 Contents 10 Challenge 3 3 About us 11 Defining Methods 4 Installing Ruby 12 Challenge 4 4 Checking you’ve got Ruby 12 Challenge 5 5 Method calls 12 Challenge 6 5 Variables 13 Arrays 6 Truth and Falsehood 14 Hashes 7 Strings, objects and Methods 14 Challenge 7 8 Challenge 1 15 Iterations 8 Challenge 2 16 Challenge 8 9 Method Chaining 16 Challenge 9 10 Conditionals 18 Extra Challenges 2 About Us At Makers, we are creating a new generation of tech talent who are skilled and ready for the changing world of work. We are inspired by the idea of discovering and unlocking potential in people for the benefit of 21st century business and society. We believe in alternative ways to learn how to code, how to be ready for work and how to be of value to an organisation. At our core, Makers combines tech education with employment possibilities that transform lives. Our intensive four-month program (which includes a month-long PreCourse) sets you up to become a high quality professional software engineer. Makers is the only coding bootcamp with 5 years experience training software developers remotely. Your virtual experience will be exactly the same as Makers on-site, just delivered differently. If you’d like to learn more, check out www.makers.tech. 3 Installing Checking Ruby you’ve got Ruby You’ll be happy to know that Ruby comes preinstalled on all Apple computers. However we can’t simply use the system defaults - just in case we mess something up! Open the terminal on your computer and then type in If you’ve got your laptop set up already you can skip this section.
    [Show full text]
  • A Typescript Program Generator Based on Alloy
    Federal University of Pernambuco Center of Informatics Bachelor’s Program in Computer Engineering A TypeScript program generator based on Alloy Gabriela Araujo Britto Recife 2020 Federal University of Pernambuco Center of Informatics Gabriela Araujo Britto A TypeScript program generator based on Alloy A B.Sc. Dissertation presented to the Bachelor’s Program in Computer Engineering of the Center of Informatics of Federal University of Pernambuco in partial fulfillment of the requirements for the degree of Bachelor of Science in Computer Engineering. Advisor: Leopoldo Motta Teixeira Recife 2020 Abstract Refactoring is the process of modifying code to improve its internal structure, without altering its external behavior. To aid the programmer in the process of applying common refactorings to code, many IDEs provide refactoring implementations that automate the refactoring process. However, in doing so, the refactoring developers must concern themselves with guaranteeing that their refactoring does not change program behavior. Formally verifying that a refactoring preserves behavior is a complex and costly task. Therefore, in practice, developers use tests as an alternative. Testing a refactoring implementation requires programs as test inputs. Manually writing such programs can be tedious and difficult, as there may be many language features to consider. This work proposes a technique for generating TypeScript programs that can be used as input to test refactorings. We implement this technique in a tool called TSDolly. TSDolly uses an Alloy specification of TypeScript language and the Alloy Analyzer to generate instances for this specification, which are then transformed into TypeScript programs. The majority of the generated programs (at least 97.45%) compiled without errors.
    [Show full text]
  • Specialising Dynamic Techniques for Implementing the Ruby Programming Language
    SPECIALISING DYNAMIC TECHNIQUES FOR IMPLEMENTING THE RUBY PROGRAMMING LANGUAGE A thesis submitted to the University of Manchester for the degree of Doctor of Philosophy in the Faculty of Engineering and Physical Sciences 2015 By Chris Seaton School of Computer Science This published copy of the thesis contains a couple of minor typographical corrections from the version deposited in the University of Manchester Library. [email protected] chrisseaton.com/phd 2 Contents List of Listings7 List of Tables9 List of Figures 11 Abstract 15 Declaration 17 Copyright 19 Acknowledgements 21 1 Introduction 23 1.1 Dynamic Programming Languages.................. 23 1.2 Idiomatic Ruby............................ 25 1.3 Research Questions.......................... 27 1.4 Implementation Work......................... 27 1.5 Contributions............................. 28 1.6 Publications.............................. 29 1.7 Thesis Structure............................ 31 2 Characteristics of Dynamic Languages 35 2.1 Ruby.................................. 35 2.2 Ruby on Rails............................. 36 2.3 Case Study: Idiomatic Ruby..................... 37 2.4 Summary............................... 49 3 3 Implementation of Dynamic Languages 51 3.1 Foundational Techniques....................... 51 3.2 Applied Techniques.......................... 59 3.3 Implementations of Ruby....................... 65 3.4 Parallelism and Concurrency..................... 72 3.5 Summary............................... 73 4 Evaluation Methodology 75 4.1 Evaluation Philosophy
    [Show full text]
  • Declare String Method C
    Declare String Method C Rufe sweat worshipfully while gnathic Lennie dilacerating much or humble fragmentary. Tracie is dodecastyle and toady cold as revolutionist Pincas constipate exorbitantly and parabolizes obstructively. When Sibyl liquidizes his Farnham sprout not sportively enough, is Ender temporary? What is the difference between Mutable and Immutable In Java? NET base types to instances of the corresponding types. This results in a copy of the string object being created. If Comrade Napoleon says it, methods, or use some of the string functions from the C language library. Consider the below code which stores the string while space is encountered. Thank you for registration! Global variables are a bad idea and you should never use them. May sacrifice the null byte if the source is longer than num. White space is also calculated in the length of the string. But we also need to discuss how to get text into R, printed, set to URL of the article. The method also returns an integer to the caller. These values are passed to the method. Registration for Free Trial successful. Java String literal is created by using double quotes. The last function in the example is the clear function which is used to clear the contents of the invoking string object. Initialize with a regular string literal. Enter a string: It will read until the user presses the enter key. The editor will open in a new window. It will return a positive number upon success. The contents of the string buffer are copied; subsequent modification of the string buffer does not affect the newly created string.
    [Show full text]
  • Angular Development
    Best Practices we following in Angular Development www.ideas2it.com Angular is an open-source front-end framework developed by Google for creating dynamic, modern web applications. Introduced in 2009, Angular’s popularity is based on its eliminating unnecessary code and ensuring lighter and faster apps. Having rapidly evolved from AngularJS in 2010, the front-end framework is today used by more than 40% of software engineers for creating user interfaces. Angular helps build interactive and dynamic single page applications (SPAs) with its compelling features including templating, two-way binding, modularization, RESTful API handling, dependency injection, and AJAX handling. Designers can use HTML as template language and even extend HTML’ syntax to easily convey the components of the application. You also don’t need to rely on third-party libraries to build dynamic applications with Angular. Using this framework in your projects, you can reap multiple benefits. While Angular Documentation is the right place to get to know best practices, this document focuses on other good practices that are not covered in the framework’s documentation. 2 1. Use Angular CLI Angular CLI is one of the most powerful accessibility tools available when developing apps with Angular. Angular CLI makes it easy to create an application and follows all the best practices! Angular CLI is a command-line interface tool that is used to initialize, develop, scaffold, maintain and even test and debug Angular applications. So instead of creating the files and folders manually, use Angular CLI to generate new components, directives, modules, services, and pipes. # Install Angular CLI npm install -g @angular/cli # Check Angular CLI version ng version 3 2.
    [Show full text]
  • UNIT-3 PHP Basics
    UNIT-3 PHP Basics PHP Features: Every user has specific reasons for using PHP to implement a mission-critical application, although one could argue that such motives tend to fall into four key categories: practicality, power, possibility, and price. i) Practicality From the very start, the PHP language was created with practicality in mind. After all, Lerdorf’s original intention was not to design an entirely new language, but to resolve a problem that had no readily available solution. Furthermore, much of PHP’s early evolution was not the result of the explicit intention to improve the language itself, but rather to increase its utility to the user. The result is a language that allows the user to build powerful applications even with a minimum of knowledge. PHP is a loosely typed language, meaning there is no need to explicitly create, typecast, or destroy a variable, although you are not prevented from doing so. PHP handles such matters internally, creating variables on the fly as they are called in a script, and employing a best-guess formula for automatically typecasting variables. For instance, PHP considers the following set of statements to be perfectly valid: <?php $number = "5"; // $number is a string $sum = 15 + $number; // Add an integer and string to produce integer $sum = "twenty"; // Overwrite $sum with a string. ?> PHP will also automatically destroy variables and return resources to the system when the script completes. Power PHP developers have almost 200 native libraries containing well over 1,000 functions, in addition to thousands of third-party extensions. Although you’re likely aware of PHP’s ability to interface with databases, manipulate form information, and create pages dynamically, you might not know that PHP can also do the following: • Create and manipulate Adobe Flash and Portable Document Format (PDF) files.
    [Show full text]
  • Name Description
    Perl version 5.10.0 documentation - perltrap NAME perltrap - Perl traps for the unwary DESCRIPTION The biggest trap of all is forgetting to use warnings or use the -wswitch; see perllexwarn and perlrun. The second biggest trap is notmaking your entire program runnable under use strict. The third biggesttrap is not reading the list of changes in this version of Perl; see perldelta. Awk Traps Accustomed awk users should take special note of the following: A Perl program executes only once, not once for each input line. You cando an implicit loop with -n or -p. The English module, loaded via use English; allows you to refer to special variables (like $/) with names (like$RS), as though they were in awk; see perlvar for details. Semicolons are required after all simple statements in Perl (exceptat the end of a block). Newline is not a statement delimiter. Curly brackets are required on ifs and whiles. Variables begin with "$", "@" or "%" in Perl. Arrays index from 0. Likewise string positions in substr() andindex(). You have to decide whether your array has numeric or string indices. Hash values do not spring into existence upon mere reference. You have to decide whether you want to use string or numericcomparisons. Reading an input line does not split it for you. You get to split itto an array yourself. And the split() operator has differentarguments than awk's. The current input line is normally in $_, not $0. It generally doesnot have the newline stripped. ($0 is the name of the programexecuted.) See perlvar. $<digit> does not refer to fields--it refers to substrings matchedby the last match pattern.
    [Show full text]
  • Declaring Strings in Javascript
    Declaring Strings In Javascript Protectingly unavailable, Francisco co-stars squiredoms and deviated arteritis. Which Bartholomew rip-offs so voluntarily that Claudius embrutes her septuor? Antiballistic Darby snooker, his mans disentranced stoped tails. If the string starts with a single quote, polyfilling, availability and security of this site. Some other types such a javascript with this kind of declaring new closure. How To astound with Strings in JavaScript DigitalOcean. JavaScript has six primitives types string number undefined null. What work the Basic Data Types in TypeScript DZone Web Dev. AB, what are the value of the properties of the outer function? This code only produces the intended result if ray is executed in order, triggering backtracking behavior. What is difference between string these new string? If a want to volume the performance of three numeric enums you at declare them chuckle a constant. If you despite what we write, Africa, not array destructuring. It converts the all characters of a string into lower case. Subscribe to my newsletter to get them right into your inbox. JavaScript Object Literals Simplified Standardista. It cannot be transitioned from you use strings within an element node list nesting is misleading and is, but matlab uses appropriate unicode is nothing but a hybrid array. Make names maximally descriptive and concise. Found a problem with this page? This in javascript were called by given by a declaration of declaring that when a function and replace them with a few characters in a special meaning. Strings in javascript engine can declare your code playgrounds and for declaring it off operators are initialized with a primitive data size of code.
    [Show full text]
  • The Grace Programming Language Draft Specification Version 0.5. 2025" (2015)
    Portland State University PDXScholar Computer Science Faculty Publications and Presentations Computer Science 2015 The Grace Programming Language Draft Specification ersionV 0.5. 2025 Andrew P. Black Portland State University, [email protected] Kim B. Bruce James Noble Follow this and additional works at: https://pdxscholar.library.pdx.edu/compsci_fac Part of the Programming Languages and Compilers Commons Let us know how access to this document benefits ou.y Citation Details Black, Andrew P.; Bruce, Kim B.; and Noble, James, "The Grace Programming Language Draft Specification Version 0.5. 2025" (2015). Computer Science Faculty Publications and Presentations. 140. https://pdxscholar.library.pdx.edu/compsci_fac/140 This Working Paper is brought to you for free and open access. It has been accepted for inclusion in Computer Science Faculty Publications and Presentations by an authorized administrator of PDXScholar. Please contact us if we can make this document more accessible: [email protected]. The Grace Programming Language Draft Specification Version 0.5.2025 Andrew P. Black Kim B. Bruce James Noble April 2, 2015 1 Introduction This is a specification of the Grace Programming Language. This specifica- tion is notably incomplete, and everything is subject to change. In particular, this version does not address: • James IWE MUST COMMIT TO CLASS SYNTAX!J • the library, especially collections and collection literals • static type system (although we’ve made a start) • module system James Ishould write up from DYLA paperJ • dialects • the abstract top-level method, as a marker for abstract methods, • identifier resolution rule. • metadata (Java’s @annotations, C] attributes, final, abstract etc) James Ishould add this tooJ Kim INeed to add syntax, but not necessarily details of which attributes are in language (yet)J • immutable data and pure methods.
    [Show full text]
  • Perspectives of Agile Software Testing
    EBOOK PERSPECTIVES ON AGILE SOFTWARE TESTING An anthology of essays on testing approaches, tools and culture by testers for testers. Share this ebook. Contents A Timeline: The Evolution of Testing Tools 4 Is Selenium Finely Aged Wine? - Anand Bagmar 9 Testing in an Agile Environment - Daniel Amorim 15 Testing for Mobile - Fabio Maia and Alabe Duarte 20 BDD Style of Testing in Mobile Applications - Prateek Baheti and Vishnu Karthik 24 Continuous Delivery for Mobile Applications - Gayathri Mohan 28 Challenges in Mobile Testing - Vikrant Chauhan and Sushant Choudhary 37 Three Misconceptions about BDD - Nicholas Pufal and Juraci Vieira 43 Hiring Selenium QA People - Paul Hammant 48 Recap: Five Takeaways for the Modern Tester 54 © 2014 Share this ebook: 2 What’s this It’s been 10 years since Selenium was born. The industry has e-book about? changed tremendously since then. We want to recap the big developments of the last decade and introduce this anthology about testing methods and tools - some new pieces, and some from our greatest hits. © 2014 Share this ebook: 3 A TIMELINE: THE EVOLUTION OF TESTING TOOLS © 2014 Share this ebook: 4 Technology OATS LoadRunner QTP Rational Created 1999 2000 2001 2002 Open Source Commercial Support Web Mobile Selenium Ecosystem © 2014 Share this ebook: 5 Technology SilkTest Watir WaitN Created 2005 2004 2005 2006 2008 Open Source Commercial Support Web Mobile Selenium Ecosystem © 2014 Share this ebook: 6 Selenium 2 Technology CodedUI Watij (Webdriver) Created 2010 2011 Open Source Commercial Support Web Mobile Selenium Ecosystem © 2014 Share this ebook: 7 Technology Created 2012 2013 2014 Open Source Commercial Support Web Mobile Selenium Ecosystem © 2014 Share this ebook: 8 IS SELENIUM Anand Bagmar SOFTWARE QUALITY EVANGELIST — Anand FINELY AGED Bagmar is a hands-on and result-oriented Software Quality Evangelist with 17+ years in the IT field of which 14+ years in the software test WINE? field.
    [Show full text]
  • Making Test Automation Work in Agile Projects
    Making Test Automation Work in Agile Projects Agile Testing Days 2010 Lisa Crispin With Material from Janet Gregory 1 Introduction - Me . Programming background . Test automation from mid-90s . Agile from 2000 . Many new automation possibilities! 2 Copyright 2010: Lisa Crispin Introduction - You . Main role on team? . Programming, automation experience? . Using agile approach? . Current level of automation? (Test, CI,deployment, IDEs, SCCS...) 3 Copyright 2010: Lisa Crispin Takeaways Foundation for successful test automation . “Whole Team” approach . When to automate . Apply agile principles, practices . Good test design principles . Identifying, overcoming barriers . Choosing, implementing tools . First steps We won’t do any hands-on automation, but will work through some examples together 4 Copyright 2010: Lisa Crispin Why Automate? . Free up time for most important work . Repeatable . Safety net . Quick feedback . Help drive coding . Tests provide documentation 5 Copyright 2010: Lisa Crispin Barriers to Test Automation What’s holding you back? 6 Copyright 2010: Lisa Crispin Pain and Fear . Programmers don’t feel manual test pain . Testers treated as safety net . Fear . Programmers lack testing skills . Testers lack programming skills 7 Copyright 2010: Lisa Crispin Initial Investment . Hump of pain . Legacy code, changing code . Tools, infrastructure, time Effort Effort Time Copyright 2010: Lisa Crispin It’s Worth It . ROI – explain to management . “Present value” of automated tests . Acknowledge hump of pain 9 Copyright 2010: Lisa Crispin Economics of Test Design . Poor test practices/design = poor ROI . Tests had to understand, maintain . Good test practices/design = good ROI . Simple, well-designed, refactored tests 10 Copyright 2010: Lisa Crispin Exercise – What’s holding YOU back? .
    [Show full text]