Skip to main content

Functional testing for command line applications

Project description

Scruf is a functional testing framework for command line applications. It is heavily inspired by cram. This is currently early in development and while I aim to maintain the current interface breaking changes may occur.

Test Structure

This is a summary of the structure of tests expected by scruf

  • Lines beginning with # are comments and are ignored

  • Non comment lines beginning with any non-space character are interpreted as test descriptions

  • Lines beginning with 4 spaces followed by a $ are commands to be tested

  • Lines beginning with 4 space followed by a > are continuations of commands

  • Non command or continuation lines beginning with 4 spaces are expected command outputs

A quick example test:

"printf" produces text
$ printf "hello\nworld!\n"
hello
world

There are examples present under examples/

Expected Output Specification

Documentation coming soon

Test Output

By default scruf will output results in TAP (Test Anything Protocol)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scruf-0.1.tar.gz (6.7 kB view hashes)

Uploaded Source

Built Distribution

scruf-0.1-py3-none-any.whl (20.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page