Debugging and test quick reference
Recall shell debugging and Bats testing patterns for status, output, and cleanup failures.
Debug versus test When do you use trace versus Bats? Use both: trace to learn, tests to lock the learning. Secret risk Let's run the whole deploy with set -x so we see everything. The script expands tokens and database URLs. Your line Trace only the narrow block or scrub secrets first. Xtrace shows expanded commands, which can expose credentials. Never turn full-script tracing into a permanent CI default for secret-heavy scripts. You get visibility without leaking sensitive values. Bats run What does Bats run capture for assertions? The command's status and output, without failing the test immediately on a…
Sign up free — one personalized lesson every day, matched to your role and goals.
Already have an account? Sign in