Teams working on the JVM can now say goodbye forever to misunderstood requirements, tedious manual acceptance tests, and out-of-date documentation. Cucumber – the popular, open-source tool that helps teams communicate more effectively with their customers – now has a Java version, and our bestselling Cucumber Book has been updated to match. The Cucumber for Java Book has the same great advice about how to deliver rock-solid applications collaboratively, but with all code completely rewritten in Java. New chapters cover features unique to the Java version of Cucumber, and reflect insights from the Cucumber team since the original book was published.
Until now it’s been difficult for teams developing Java applications to learn how to benefit from Behaviour-Driven Development (BDD). This book changes all that by describing in detail how to use Cucumber to harness the power of plain language specifications in your development process.
In part 1, you’ll discover how to use Cucumber’s Gherkin DSL to describe the behavior your customers want from the system. You’ll also learn how to write Java code that interprets those plain language specifications and checks them against your application. Part 2 guides you through a worked example, using Spring, MySQL, and Jetty. Enhanced chapters teach you how to use Selenium to drive your application and handle asynchronous Ajax calls, and new chapters cover Dependency Injection (DI) and advanced techniques to help keep your test suites fast. Part 3 shows you how to integrate Cucumber with your Continuous Integration (CI) system, work with a REST web service, and even use BDD with legacy applications.
Written by the creator of Cucumber and two of its most experienced users and contributors, The Cucumber for Java Book is an authoritative guide that will give you and your team all the knowledge you need to start using Cucumber with confidence.
Author(s): Seb Rose, Matt Wynne
Your customers want rock-solid, bug-free software that does exactly what they expect it to do. Yet they can’t always articulate their ideas clearly enough for you to turn them into code. You need Cucumber: a testing, communication, and requirements tool-all rolled into one. All the code in this book is updated for Cucumber 2.4, Rails 5, and RSpec 3.5.
Express your customers’ wild ideas as a set of clear, executable specifications that everyone on the team can read. Feed those examples into Cucumber and let it guide your development. Build just the right code to keep your customers happy. You can use Cucumber to test almost any system or any platform.
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. Then write Ruby code that interprets those plain-language specifications and checks them against your application. Next, consolidate the knowledge you’ve gained with a worked example, where you’ll learn more advanced Cucumber techniques, test asynchronous systems, and test systems that use a database. Recipes highlight some of the most difficult and commonly seen situations the authors have helped teams solve. With these patterns and techniques, test Ajax-heavy web applications with Capybara and Selenium, REST web services, Ruby on Rails applications, command-line applications, legacy applications, and more.
Written by the creator of Cucumber and the co-founders of Cucumber Ltd., this authoritative guide will give you and your team all the knowledge you need to start using Cucumber with confidence.
What You Need:
Windows, Mac OS X (with XCode) or Linux, Ruby 1.9.2 and upwards, Cucumber 2.4, Rails 5, and RSpec 3.5
Author(s): Matt Wynne, Aslak Hellesoy
3. Cucumber With Java: Beginner’s Guide (2016)
Author(s): Mr Paul Watson
You can test just about anything with Cucumber. We certainly have, and in Cucumber Recipes we’ll show you how to apply our hard-won field experience to your own projects. Once you’ve mastered the basics, this book will show you how to get the most out of Cucumber–from specific situations to advanced test-writing advice. With over forty practical recipes, you’ll test desktop, web, mobile, and server applications across a variety of platforms. This book gives you tools that you can use today to automate any system that you encounter, and do it well.
The Cucumber Book showed you how your team can work together to write executable specifications–documents that tell a clear story and also happen to be working test code. We’ll arm you with ready-rolled solutions to real-world problems: your tests will run faster, read more clearly, and work in any environment.
Our first tips will help you fit Cucumber into your workflow. Powerful filters will tame tables full of test data, transforming them into the format your application needs. Custom output formatters will generate reports for any occasion. Continuous Integration servers will run your Cucumber tests every time the code changes. Next, you’ll find recipes tailored to the platform you’re running on. Ever wanted to know how to test a Grails app from Cucumber? Need to put a Windows program through its paces? How about a mobile app running on Android or iOS? We’ll show you how to do all of these.
Throughout the book, you’ll see how to make Cucumber sing as you interoperate with different platforms, languages, and environments. From embedded circuits to Python and PHP web apps, Cucumber has something for you.
What You Need:
You’ll need basic working knowledge of Cucumber and Ruby. Individual recipes may have additional requirements; for example, a recipe on Windows automation might pull in an open source GUI driver.
We’ve written the recipes for compatibility with Ruby 1.9.3 and 1.8.7, plus Cucumber 1.1.4. Other versions may work as well, but these are the ones we test with.
Author(s): Ian Dees, Matt Wynne
5. The Cucumber Book: Behaviour-Driven Development for Testers and Developers (Pragmatic Programmers) (2012)
Your customers want rock-solid, bug-free software that does exactly what they expect it to do. Yet they can’t always articulate their ideas clearly enough for you to turn them into code. The Cucumber Book dives straight into the core of the problem: communication between people. Cucumber saves the day; it’s a testing, communication, and requirements tool – all rolled into one.
We’ll show you how to express your customers’ wild ideas as a set of clear, executable specifications that everyone on the team can read. 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.
The first part of the book teaches you how to use the core features of Cucumber. You’ll learn how to use Cucumber’s Gherkin DSL to describe– in plain language – the behavior your customers want from the system. You’ll learn how to write Ruby code that interprets those plain language specifications and checks them against your application. In Part 2, you’ll consolidate the knowledge you just gained with a worked example.
Although it was born in the Ruby community, you can use Cucumber to test almost any system, from a simple shell script or a Perl script, to enterprise PHP or a Java web application. In Part 3, you’ll find a selection of recipes for some of the most common situations you’ll encounter using Cucumber in the wild. You’ll learn how to test Ajax-heavy web applications with Capybara and Selenium, REST web services, Ruby on Rails applications, command-line applications, legacy applications and lots more!
Written by the creator of Cucumber and one of its most experienced users and contributors, The Cucumber Book is an authoritative guide that will give you and your team all the knowledge you need to start using Cucumber with confidence.
What You Need:
Windows, Mac OS X (with XCode) or Linux
Ruby 1.9.2 and upwards
Author(s): Matt Wynne, Aslak Hellesoy
“Our tests are broken again!” “Why does the suite take so long to run?” “What value are we getting from these tests anyway?” Solve your testing problems by building and maintaining quality software with RSpec – the popular BDD-flavored Ruby testing framework. This definitive guide from RSpec’s lead developer shows you how to use RSpec to drive more maintainable designs, specify and document expected behavior, and prevent regressions during refactoring. Build a project using RSpec to design, describe, and test the behavior of your code. Whether you’re new to automated tests or have been using them for years, this book will help you write more effective tests.
RSpec has been downloaded more than 100 million times and has inspired countless test frameworks in other languages. Use this influential Ruby testing framework to iteratively develop a project with the confidence that comes from well-tested code. This book guides you through creating a Ruby project with RSpec, and explores the individual components in detail.
Start by learning the basics of installing and using RSpec. Then build a real-world JSON API, using RSpec throughout the process to drive a BDD-style outside-in workflow. Apply an effective test strategy to write fast, robust tests that support evolutionary design through refactoring. The rest of the book provides the definitive guide to RSpec’s components. Use rspec-core’s metadata to slice and dice your spec suite. Dig into rspec-expectations’ matchers: compose them in flexible ways, specify expected outcomes with precision, and diagnose problems quickly with the help of good failure messages. Write fast, isolated tests with rspec-mocks’ test doubles while pushing your code toward simpler interfaces.
The authors, with a combined 20 years of automated testing experience, share testing wisdom that will lead to a fun, productive testing experience.
What You Need:
To follow along with the book, you’ll need Ruby 2.2+. The book will guide you through installing RSpec 3 and setting up a new project to use it.
Author(s): Myron Marston, Ian Dees
BDD in Action teaches you the Behavior-Driven Development model and shows you how to integrate it into your existing development process. First you’ll learn how to apply BDD to requirements analysis to define features that focus your development efforts on underlying business goals. Then, you’ll discover how to automate acceptance criteria and use tests to guide and report on the development process. Along the way, you’ll apply BDD principles at the coding level to write more maintainable and better documented code.
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
About the Technology
You can’t write good software if you don’t understand what it’s supposed to do. Behavior-Driven Development (BDD) encourages teams to use conversation and concrete examples to build up a shared understanding of how an application should work and which features really matter. With an emerging body of best practices and sophisticated new tools that assist in requirement analysis and test automation, BDD has become a hot, mainstream practice.
About the Book
BDD in Action teaches you BDD principles and practices and shows you how to integrate them into your existing development process, no matter what language you use. First, you’ll apply BDD to requirements analysis so you can focus your development efforts on underlying business goals. Then, you’ll discover how to automate acceptance criteria and use tests to guide and report on the development process. Along the way, you’ll apply BDD principles at the coding level to write more maintainable and better documented code.
No prior experience with BDD is required.
- BDD theory and practice
- How BDD will affect your team
- BDD for acceptance, integration, and unit testing
- Reporting and living documentation
About the Author
John Ferguson Smart is a specialist in BDD, automated testing, and software lifecycle development optimization.
Table of Contents
- Building software that makes a difference
- BDD—the whirlwind tour
- Understanding the business goals: Feature Injection and related techniques
- Defining and illustrating features
- From examples to executable specifications
- Automating the scenarios
- From executable specifications to rock-solid automated acceptance tests
- Automating acceptance criteria for the UI layer
- Automating acceptance criteria for non-UI requirements
- BDD and unit testing
- Living Documentation: reporting and project management
- BDD in the build process
PART 1: FIRST STEPS
PART 2: WHAT DO I WANT? DEFINING REQUIREMENTS USING BDD
PART 3: HOW DO I BUILD IT? CODING THE BDD WAY
PART 4: TAKING BDD FURTHER
Author(s): John Ferguson Smart
8. The RSpec Book: Behaviour Driven Development with RSpec, Cucumber, and Friends (The Facets of Ruby Series) (2010)
Behaviour-Driven Development (BDD) gives you the best of Test Driven Development, Domain Driven Design, and Acceptance Test Driven Planning techniques, so you can create better software with self-documenting, executable tests that bring users and developers together with a common language.
Get the most out of BDD in Ruby with The RSpec Book, written by the lead developer of RSpec, David Chelimsky.
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. 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.
Whether you’re developing applications, frameworks, or the libraries that power them, The RSpec Book will help you write better code, better tests, and deliver better software to happier users.
Author(s): David Chelimsky, Dave Astels
9. Learn Microservices with Spring Boot: A Practical Approach to RESTful Services using RabbitMQ, Eureka, Ribbon, Zuul and Cucumber (2017)
- Build microservices with Spring Boot
- Use event-driven architecture and messaging with RabbitMQ
- Create RESTful services with Spring
- Master service discovery with Eureka and load balancing with Ribbon
- Route requests with Zuul as your API gateway
- Write end-to-end rest tests for an event-driven architecture using Cucumber
- Carry out continuous integration and deployment
Author(s): Moises Macero
10. Cucumber Cookbook (2015)
Over 35 hands-on recipes to efficiently master the art of behaviour-driven development using Cucumber-JVM
About This Book
- Create a test automation framework to handle web, REST, and native mobile application automation
- Discover Glue code, Hooks, Tags, and Cucumber’s integration with Maven, Jenkins, and Git
- Comprehensive recipes in Cucumber for behaviour-driven development and test automation
Who This Book Is For
This book is intended for business and development personnel who want to use Cucumber for behavior-driven development and test automation. Readers with some familiarity with Cucumber will find this book of most benefit.
Since the main objective of this book is to create test automation frameworks, previous experience in automation will be helpful.
What You Will Learn
- Explore the usage of the Gherkin Language to write meaningful and smart Feature files
- Understand Scenario, Steps, Backgrounds, Scenario Outlines, and Data Tables
- Discover the concepts of Glue Code and Step Definitions in detail
- Gain insights into the different types of Step Definitions, Regular Expressions, Doc Strings, Data Table transformations, and Capture Groups
- Master the advanced concepts of implementing Tags and Hooks
- Override default Cucumber options and settings along with different output report formats
- Run Jenkins and Cucumber from Terminal while running various Cucumber Scenarios in parallel
Today, behaviour-driven development (BDD) is gaining popularity around the world. Cucumber-JVM is one of the fastest growing tools and offers a cutting-edge platform for conceptualizing and implementing BDD. The variety of features available within Cucumber enhances the experience of implementing BDD for both business and development teams.
This book provides you with the skills you need to successfully create, customize, and configure the Cucumber framework. You will discover how to create Feature files, and Step Definitions, and enable various configurations, such as “Before” and “After” functions, with fun exercises. You’ll round off your learning by creating automation frameworks to automate Web, REST, and Mobile apps.
Author(s): Shankar Garg
11. Engineering Long-Lasting Software: An Agile Approach Using SaaS and Cloud Computing, Beta Edition (2012)
Author(s): Armando Fox, David Patterson
Does your Rails code suffer from bloat, brittleness, or inaccuracy? Cure these problems with a regular dose of test-driven development. Rails 4 Test Prescriptions is a comprehensive guide to how tests can help you design and write better Rails applications. In this completely revised edition, you’ll learn why testing works and how to test effectively using Rails 4, Minitest 5, and RSpec 3, as well as popular testing libraries such as factory_girl and Cucumber. Do what the doctor ordered to make your applications feel all better. Side effects may include better code, fewer bugs, and happier developers.
Your Ruby on Rails application is sick. Deadlines are looming, but every time you make the slightest change to the code, something else breaks. Nobody remembers what that tricky piece of code was supposed to do, and nobody can tell what it actually does. Plus, it has bugs. You need test-driven development, a process for improving the design, maintainability, and long-term viability of software.
Containing both practical code examples and discussion of why testing works, this book starts with the most basic features delivered as part of core Ruby on Rails. Once you’ve integrated those features into your coding practice, you’ll learn how to use popular third-party testing tools such as RSpec, Mocha, Cucumber, and factory_girl. You’ll test the component parts of a Rails application, including the back-end model logic and the front-end display logic. Using Rails examples, you’ll learn how to use testing to enable your code to respond better to future change. Plus, you’ll see how to handle real-world testing situations.
What You Need:Ruby 2.1, Rails 4
Author(s): Noel Rappin