testing command line utilities

后端 未结 4 2156
青春惊慌失措
青春惊慌失措 2021-02-14 02:01

I\'m looking for a way to run tests on command-line utilities written in bash, or any other language.

I\'d like to find a testing framework that would have statements li

4条回答
  •  我寻月下人不归
    2021-02-14 02:27

    outside of any prepackaged testing framework that may exist but I am unaware of, I would just point out that expect is an awesome and so underutilized tool for this kind of automation, especially if you want to support multistage interaction, which is to say not just send a command and check output but respond to output with more input. If you wind up building your own system, it's worth looking into.

    There is also python reimplementation of expect called pexpect.There may be some direct interfaces to the expect library available as well. I'm not a python guy so I couldn't tell you much about them.

提交回复
热议问题