测试命令行工具的最佳方式? [英] Best way to test command line tools?

查看:314
本文介绍了测试命令行工具的最佳方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收集了大量的命令行实用程序,我们写自己和经常使用。目前,测试它们非常麻烦,因此我们不这样做尽可能多的测试,我们奥特。

I have a large collection of command line utilities that are we write ourselves and use frequently. At the moment testing them is very cumbersome and consequently we don't do as much testing as we aught to.

我想知道如果任何人都可以提出很好的技术或工具做这种事情的一个好工作。

I am wondering if anyone can suggest good techniques or tools for doing a good job of this kind of thing.

编辑:澄清这是UNIX

to clarify this is UNIX

在此先感谢。
汤姆

Thanks in advance. Tom

推荐答案

阿鲁巴是一个的黄瓜扩展以任何编程语言测试命令行应用程序。

Aruba is a Cucumber extension for testing command line applications written in any programming language.

要使用它,还需要Ruby运行测试,但阿鲁巴的目的是提供pre-定义步长定义库,这样你就不需要写任何Ruby code做一个可行的测试套件。 (虽然在某些时候,你可能会想要写有点红宝石做一些自定义步骤。)

To use it, you will need ruby to run the tests, but the purpose of aruba is to provide a library of pre-defined step definitions so that you won't need to write any ruby code to make a workable test suite. (Though at some point you probably will want to write a bit of ruby to make a few custom steps.)

您可以看到与Aruba这里测试一个命令行工具的一个复杂的例子: jingweno / GH

You can see a sophisticated example of a command line tool tested with aruba here: jingweno/gh

这篇关于测试命令行工具的最佳方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆