Are you a tester who spends more time manually creating complex test data than using it? A business analyst who seemingly went to college all those years so you can spend your days copying data from reports into spreadsheets? A programmer who can't finish each day's task without having to scan through version control system output, looking for the file you want? If so, you're wasting that computer on your desk. Offload the drudgery to where it belongs, and free yourself to do what you should be doing: thinking. All you need is a scripting language (free!), this book (cheap!), and the dedication to work through the examples and exercises.
Everyday Scripting with Ruby is divided into four parts. In the first, you'll learn the basics of the Ruby scripting language. In the second, you'll see how to create scripts in a steady, controlled way using test-driven design. The third part is about finding, understanding, and using the work of others--and about preparing your scripts for others to use. The fourth part, more advanced, is about saving even more time by using application frameworks.
Review By: Mark Cole 02/29/2008
Everyday Scripting with Ruby for Teams, Testers and You, by Brian Marick, is an excellent hands-on tutorial that explains how to use the powerful, object-oriented, open source scripting language of Ruby. It is written for the technical tester, yet the curious beginner would also have no trouble understanding this book. Mainly, it's written for people who want to remove a little of the tedium and frustration from their jobs. Certainly automatic testers have all experienced the "joys" of creating hundreds of users by hand, creating files of different sizes, or putting together large data sets that involve incrementing by one. These processes could and should be done automatically, and a language such as Ruby, can help.
My problem with this book is that it focuses only on Ruby. What about Python? What about Perl? What about looking for a script that already does what you want? My other gripe is that it does not deal with the automatic testing problem that automatic testers are primarily interested in. That is, it does not teach you how to use Ruby to "drive" a program. It doesn't teach you how to automate you program under test using Ruby. Instead, the author mentions Watir (http://wtr.rubyforge.org/), which is a Ruby-based tool that drives Web browsers and is open source. He also mentions Selenium (http://docs.seleniumhq.org). These tools are highlighted on pages 149-152.
That said, this is a practical hands-on book that will get you started scripting in Ruby while also learning interesting things about regular expressions, HTML, and XML along the way. For Ruby learners, this book is a good tutorial.
I would recommend this book to someone who would like to, or needs to, learn Ruby, and likes to read it in books. I would recommend testers to get Ruby and Watir and play around with these and other open source tools to solve the problems of tedium testing tasks.