sstephenson / bats

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

Manage test dependencies #261

Open flaupretre opened 5 years ago

flaupretre commented 5 years ago

Very often, tests have pre-requisites. This may be services to be on, packages to be installed, or others. When these pre-requisites are not present, depending tests fail with cryptic messages, generally causing a bunch of errors to be displayed, forcing the user to decrypt that all these errors have the same root cause.

The change proposed here adds a mechanism to check whether one or more previous tests succeeded. The idea is to skip depending tests when one or more pre-requisite tests fail. In such case, you will get only significant failure(s) and avoid a cascade of useless and disturbing error messages.

More details in the README.md file.