Fun programming with bash and docker
Image with kcov
and shunit2
to execute tests and generate a code coverage report.
Built with ❤︎ by Anderson Santos and contributors
- Shunit2: Has shunit2 installed
- Kcov: has kcov installed
You must mount the source code and execute the test script inside the image with kcov command. The example is bellow.
There is a repository with a example of a bash script using this image at: https://github.com/supergarotinho/bashtest-example
Example of use:
docker run --rm \
--security-opt seccomp=unconfined \
-v "$(pwd)":/source \
-e "TERM=xterm-256color" supergarotinho/bashtest kcov --exclude-path=/root/shunit2 ./coverage ./test/unit-test.sh
- Docker installed
- Shunit2 - The bash testing framework
- Kcov - Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options
- Anderson Santos - Initial work - supergarotinho
See also the list of contributors who participated in this project.
This project is licensed under the BSD-3 License - see the LICENSE.md file for details