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 41Test Lua Code Using cucumber-lua

Problem

You want to test your Lua project using Cucumber.

Ingredients

  • The Lua programming language, version 5.1[270]

  • cucumber-lua,[271] a Lua implementation of the Cucumber wire protocol

  • The LuaRocks package management system[272] to install cucumber-lua

Solution

Lua is an enjoyable programming language that’s small, fast, portable, and extensible. cucumber-lua is a testing library written in Lua that implements Cucumber’s wire protocol. With it, you can write your tests in Cucumber syntax and your step definitions in Lua.

Setup

You’ll need both the base Lua language and the LuaRocks package management system—which is a bit like RubyGems. On the Mac, you can install both of these with one command ...

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