Bash Testing

2018-08-02  本文已影响21人  michael_jia

bats-core

Comparison

No. tools language star release date description
1 bats-core Shell 355 1.1.0 July 2018 Bats
<1 bats Shell 4905 0.4.0 Aug 2014 Bash Automated Testing System
2 bash_unit Shell 79 1.6.1 Feb 2018 bash unit testing enterprise edition framework for professionals !
3 shunit2 Shell 527 2.1.7 Jan 2018 xUnit unit test framework
4 assert.sh Shell 361 1.1 Feb 2015 bash unit testing framework
5 roundup Shell 385 0.0.6 Jan 2015 eliminate bugs and weeds from shell scripts
6 shelltestrunner Haskel 36 1.9 Jan 2018 Easy, repeatable testing of CLI programs/commands
7 bashtest python 24 0.0.7 Aug 2016 UNIX command-line tool for testing bash/sh scripts
8 BeakerLib Shell 11 1.17 May 2018 shell-level integration testing library

参考

it's possible to import (include, whatever) a procedure (function, whatever it's named) from an external file. That's the key to writing a testing script: you break up your script into independent procedures that can then be imported into both your running script and your testing script, and then you have your running script be as simple as possible.

This method is like dependency injection for scripts, and sounds reasonable.

上一篇 下一篇

猜你喜欢

热点阅读