Recipe 41 | Test 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 ...
Get Cucumber Recipes now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.