sstephenson / bats

Bash Automated Testing System
MIT License
7.12k stars 519 forks source link

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

Open harschware opened 8 years ago

harschware commented 8 years ago

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 commented 8 years ago

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.

mstormi commented 5 years ago

@sstephenson any reason this never made in into bats ?

LordJashin32 commented 4 years ago

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.