background preloader

TDD and BDD

Facebook Twitter

Better Specs. The RSpec Book. About this Book 450 pages Published: Release: P2.1 (2012-09-13) ISBN: 978-1-93435-637-1 You’ll get started right away with RSpec 2 and Cucumber by developing a simple game, using Cucumber to express high-level requirements in language your customer understands, and RSpec to express more granular requirements that focus on the behavior of individual objects in the system.

The RSpec Book

You’ll learn how to use test doubles (mocks and stubs) to control the environment and focus the RSpec examples on one object at a time, and how to customize RSpec to “speak” in the language of your domain. You’ll develop Rails 3 applications and use companion tools such as Webrat and Selenium to express requirements for web applications both in memory and in the browser. And you’ll learn to specify Rails views, controllers, and models, each in complete isolation from the other. Foreword Caution!

You see, this book isn’t about RSpec at all. Perhaps you thought you might read about Cucumber? No. You see. . . . . . The Cucumber Book. About this Book 336 pages Published: Release: P3.0 (2014-03-28) ISBN: 978-1-93435-680-7 Matt Wynne and Aslak Hellesøy show you how to express your customers’ wild ideas as a set of clear, executable specifications that everyone on the team can read.

The Cucumber Book

You’ll learn how to feed those examples into Cucumber and let it guide your development. You’ll build just the right code to keep your customers happy, and not a line more. Although it was born in the Ruby community, you can use Cucumber to test almost any system, from a simple shell script or Perl script, to web applications written in PHP, Java, or any platform. In Part 1, you’ll get started by using the core features of Cucumber and working with Cucumber’s Gherkin DSL to describe—in plain language—the behavior your customers want from the system. In Part 2, you’ll consolidate the knowledge you’ve gained with a worked example, where you’ll learn more advanced Cucumber techniques.

About the Author Upcoming Author Events. Scripted GUI Testing with Ruby. If you need to automatically test a user interface, this book is for you.

Scripted GUI Testing with Ruby

Whether it’s Windows, a Java platform (including Mac, Linux, and others) or a web app, you’ll see how to test it reliably and repeatably. Many automated test frameworks promise the world and deliver nothing but headaches. Fortunately, you’ve got a secret weapon: Ruby. Ruby lets you build up a solution to fit your problem, rather than forcing your problem to fit into someone else’s idea of testing. This book is for people who want to get their hands dirty on examples from the real world—and who know that testing can be a joy when the tools don’t get in the way.

eBook This version, last updated Jan 2012, refreshes the RSpec examples for version 2.x. Continuous Testing. About this Book 160 pages Published: Release: P1.0 (2011-06-27) ISBN: 978-1-93435-670-8 Now you can immediately detect problems in code—before it’s too late, and before problems spread.

Continuous Testing

It isn’t magic, but a clever combination of tests, tools, and techniques that tells you right away when there’s a problem. Not minutes, hours or days from now, but right now, when it’s easiest to fix. Spend more of your time writing valuable software, and less time slogging through code line-by-line and second-guessing your decisions. We’ll show you how to set up and run automated tests that check your work continuously as you write code. You’ll discover the fundamentals of creating and maintaining a test suite that’s fast, informative, reliable, and exhaustive.

You’ll start with examples in Ruby, Rails, and JavaScript, but you’ll learn general techniques you can apply to a wide range of languages and frameworks. About the Author.