We have a system that has some bash scripts running besides Java code. Since we are trying to Test Everything That Could Possibly Break, and those bash scripts may break, we
Maybe this can be used, or contributed to
https://thorsteinssonh.github.io/bash_test_tools/
Intended to write results in TAP protocol which I imagine is good for CI, and good for those that want shell environments. I imagine some things run in shell environments so, some might argue should be tested in their shell environment.
I created shellspec because I wanted a easy-to-use and useful tool.
It written by pure POSIX shell script. It has tested with many shells more than shunit2. It has powerful features than bats/bats-core.
For example, support nested block, easy to mock/stub, easy to skip/pending, parameterized tests, assertion line number, execute by line number, parallel execution, random execution, TAP/JUnit formatter, coverage and CI integration, profiler and etc.
See the demo on the project page.
I’ve tried a lot of the solutions presented here, but found most of them to bulky and hard to use, so I built my own little testing framework: https://github.com/meonlol/t-bash
It’s just one file in the repo that you can simply run directly, with a basic set of JUnit style asserts.
I’ve used it professionally in several internal projects and were able to make our bash scripts super stable and regression resistant.
You might want to take a look at bash_unit:
https://github.com/pgrange/bash_unit
I quite like shell2junit, a utility to generate JUnit-like output from Bash script tests. This is useful because the report generated can then be read by continuous integration systems, such as the JUnit plug-ins for Jenkins and Bamboo.
While shell2junit doesn't provide the comprehensive Bash scripting framework like shunit2, it does allow you have nice reporting of the test results.
Take a look at Outthentic, it is simple, extensible by many languages ( Perl, Python, Ruby, Bash on choice ) and cross platform ( Linux, Windows ) framework to test any command line applications.