- Install
bats
Bash Automated Testing System from github https://github.com/bats-core/ - Download bats helper libraries:
cd bats
source install_bats.sh
This command will install helper libraries into temporary folder /target
and arrange check out
into specified release tags. The folder won't be commited and can be deleted manually after testing
and recreated again running the command ones more.
For interactive tests, 'expect' tool is used. For Debian based system it can be installed with:
sudo apt-get install expect
If expect is not installed, then tests that require it, will be skipped.
Precondition: bats helper libraries are installed. Run tests:
cd bats
source variables.sh
bats cdoc2_tests.bats
Result has to as follows:
✓ Starting...
✓ test1: ......
✓ test2: ......
...............
✓ All tests were executed.
3 tests, 0 failures
All test vectors within testing will be created in the same temporary folder /target
. Test
results will be deleted after each test case execution automatically.