Unit Testing bash scripts

后端 未结 16 693
暖寄归人
暖寄归人 2020-11-30 18:51

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

16条回答
  •  温柔的废话
    2020-11-30 19:09

    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.

提交回复
热议问题