Chapter 16
Testing Command-Line
Applications with Aruba

Command-line applications are the bread and butter of many programming tasks. Any programmer is familiar with common command-line applications like ls/dir, cp/copy, and cd. If you are a Linux or OS X user, you probably use them a lot—ps and kill for process management; grep, sed, and awk for file manipulation; and so on. Even cucumber is a command-line application.

You have probably written a couple of command-line applications or scripts yourself. Even a Rake task is an example of a command-line script. A command-line application usually starts its life as a small script, but often it evolves into a more elaborate program. While many people end up testing the internal logic of a command-line application with unit tests, it is less common to test the whole stack of the application by interacting with it as a user would, through the command-line interface—the user interface of the application.

In this chapter, you’ll learn how a Cucumber plug-in called Aruba lets you test your own (and other people’s) command-line applications. Before we dive in, let’s first look at some characteristics that all command-line applications have in common.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.106.237