bats icon indicating copy to clipboard operation
bats copied to clipboard

adds ability to output TAP to file and release STDOUT from tests

Open harschware opened this issue 8 years ago • 3 comments

This pull request makes bats more amenable to running at command line and for running from inside build systems such as Jenkins. You can now provide parameters "-t -r -o myresults.tap" and will see any output coming from bats tests or commands that bats tests call that are producing output go directly to STDOUT in real time. The results of the test will be directed to the file myresults.tap and will be in TAP format per the -t parameter. The effect is that the Jenkins console will contain the output from the test execution and the tap results can be picked up by the TAP plugin by scanning the workspace for the myresults.tap file.

harschware avatar Feb 19 '16 00:02 harschware

I'm hoping the call for maintainers in issue #150 will help work out PR's to include in a 1.0 release, and this PR would be included.

harschware avatar May 19 '16 03:05 harschware

@sstephenson any reason this never made in into bats ?

mstormi avatar Aug 25 '19 20:08 mstormi

I guess this doesn't fit the purpose of a testing framework in general. If you are going to check the output of the commands anyway. Why use a testing framework that is supposed to check it for you. If you have to use your eyes on some commands to see if the output is good. Then run those maybe outside of bats instead. I think maybe if you want both worlds available to you. Run your commands by themselves (all of them) and output their stdout to a file. And then run bats afterwards. EDIT: Sorry to bump this from the dead. Also perhaps making Bats compatible with TAP plugin is not a bad idea. But i think what i said above is the reason the owner doesn't want to merge it.

LordJashin32 avatar Mar 26 '20 02:03 LordJashin32