How tosuser/shmock works
shMock is a shell-script testing framework: a test author writes a test suite, loads the mocking helper, and runs tests that control commands and functions used by a script. The README describes setup, test execution, mock reset, and teardown; the tree includes a Jenkins-oriented example suite and the helper library. No source excerpts were provided, so the example suite’s specific calls and the helper’s internal behavior cannot be verified.
Main entry points: jenkinsjob.test.sh Test suite · jenkinsjob.sh Script under test · test.mock.shinc Mock helper
Components 4
Test workflow
- Test suite
jenkinsjob_example/jenkinsjob.test.sh - Script under test
jenkinsjob_example/jenkinsjob.sh
Mocking framework
- Mock helper
testhelper/test.mock.shinc
Other components
- Test author
Connections 3
- Test author → Test suite: writes tests
README.md - Test suite → Mock helper: loads helper
README.md - Test suite → Script under test: tests