

Bats: TAP-compatible testing for Bash - sstephenson
https://github.com/sstephenson/bats

======
kinow
Hi there,

Perhaps you could add this to the list of TAP Producers in testanything.org.
Here's the link for the Shell producers entry.

[http://testanything.org/wiki/index.php/TAP_Producers#SH_.2F_...](http://testanything.org/wiki/index.php/TAP_Producers#SH_.2F_Shell_Script)

There are two other tools that produce TAP in Shell there, but I haven't used
any of them. Before going to sleep I decided give it a try to use Bats in
Jenkins. Here's the result:

[http://www.kinoshita.eti.br/2011/12/30/testing-shell-code-
an...](http://www.kinoshita.eti.br/2011/12/30/testing-shell-code-and-
producing-tap-using-jenkins/)

Thanks for sharing.

Cheers, Bruno P. Kinoshita

~~~
mlafeldt
Thanks for pointing me to the TAP Producers list; added Sharness too
(<http://git.io/sharness>). I'm sure it can be used with Jenkins as well.

------
apenwarr
You could also try wvtest, which is a bit lighter weight and works with any
shell, not just bash: <https://github.com/apenwarr/wvtest>

------
LeafStorm
Why, for the love of Notch, do people keep porting everything that you're
supposed to be doing in a real programming language to Bash? Yes, it's Turing
complete, but the syntax is ugly and inconsistent, there is just about no
support for data structures, and you have to fork a process to do practically
anything!

~~~
sstephenson
Bats isn't a port of anything, and sometimes Bash is the right tool for the
job.

I maintain two other projects written in Bash (rbenv and ruby-build). I
looked, and couldn't find any suitable testing tools for Bash, so I created
Bats.

My criteria for deciding what to work on in the open-source world is: do I
need something that doesn't yet exist, or something whose existing
implementations are unsuitable? If yes, I try to fill the void as best I can,
and package it up nicely so others can use it too.

~~~
abecedarius
FWIW here's a vaguely doctest-like tool I wrote:
<https://github.com/darius/tush>

May be unsuitable for you, as you say -- it looks like it takes less
typing/punctuation to write the example tests, though.

~~~
sstephenson
Wow, I really like the literate style. Great stuff.

~~~
abecedarius
Thanks!

