Working with Files and Executables

Command-line applications often deal with files on the file system. The most trivial example is the cat command (type on Windows), which prints the contents of a file to STDOUT. Command-line applications will read files, and sometimes they’ll write them too. So when we test them, we need to be able to create files or examine their contents as part of our scenarios.

Remember way back at the beginning of the book in Chapter 2, First Taste where we created a simple command-line calculator? We’re going to revisit that example now, this time using Aruba to take care of interacting with the calculator. We’ll build a slightly different calculator that uses a file as input this time so that we can show you more ...

Get The Cucumber Book now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.