3 ms·
Unit testing just means running your programs or subprograms with different inputs and checking the result. Nothing about this is hard in bash. Why would it be?
by mbrock 9y ago
Unit testing just means running your programs or subprograms with different inputs and checking the result. Nothing about this is hard in bash. Why would it be?
- octalmage 9y agoThis is usually referred to as functional or acceptance testing. The goal of these types of tests is to confirm that the overall application works as expected from a users perspective. This is easy with bash. Testing individual units of code inside of a bash script is more difficult. This can be useful for pin pointing which function introduced a bug. Edit: want to add that difficult does not mean impossible. Bats exists, and you could structure a bash script to be more easily testable.