Skip to Main Content
Cucumber Recipes
book

Cucumber Recipes

by Ian Dees, Matt Wynne, Aslak Hellesoy
February 2013
Intermediate to advanced content levelIntermediate to advanced
272 pages
5h 45m
English
Pragmatic Bookshelf
Content preview from Cucumber Recipes
Recipe 7Test Across Multiple Cores

Problem

You want to give your tests a quick speed boost by distributing them across all the cores on your development machine.

Ingredients

  • The parallel gem[45] for distributing tasks within a single test

  • The parallel_tests gem[46] for distributing entire features across multiple cores

Solution

Unless you tell it otherwise, Cucumber typically runs your features in a single process containing a single thread. Modern desktop machines often have multiple cores; even my little travel computer has two. By breaking work into pieces and farming them out to all the cores on your machine, you can run your tests faster.

Parallel Tasks

Imagine you have the following scenario in features/shipping.feature:

multiple_cores/parallel/features/shipping.feature ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Cucumber Cookbook

Cucumber Cookbook

Shankar Garg
Basiswissen Softwaretest , 6th Edition

Basiswissen Softwaretest , 6th Edition

Andreas Spillner, Tilo Linz
React Cookbook

React Cookbook

David Griffiths, Dawn Griffiths

Publisher Resources

ISBN: 9781941222607Errata