Hi,
I guess that's basically what BATS do, it uses Node to parse the test cases
line by line, then executes the command using bash and captures stdout, stderr
and exit-code. It further fails a test on exit-code>0 or if an assert based on
output fails. Not impossible to implement in Java/Junit,
Funny, I was currently looking for a solution to make the bats tests run on
Windows.
I would probably prefer a JUnit approach that executes the commands with
ProcessBuilder and avoid that way additional dependencies and test frameworks.
We would also avoid having duplicate tests.
I considered