stl is designed based on the following principles.
- Accessibility: Emphasizes the ability for developers with shell scripting experience to start using it immediately
- Simplicity: Avoids complex dependencies and configurations, maintaining an intuitive structure
- Portability: Prioritizes POSIX shell compatibility to work in various environments
- Extensibility: Provides a flexible structure that allows users to add their own assertions and features
The main structure of the installed stl is as follows.
stl
├── code # Directory to store test code files
├── data # Directory to store data used in tests
├── doc # Directory to store various documents
├── func # Directory to store test function files
├── mod # Directory to store various modules
└── start_stl.sh # Script for test execution
This is the directory where user-created test codes are stored.
Each test file has a .sh
extension.
This is the directory for storing various data files used in tests. It stores input data needed for test cases and expected output data.
This directory stores various documents related to stl. It includes usage instructions, design philosophy, and API references.
This directory stores common functions used in tests and custom functions defined by users. This facilitates the reuse of functions between test codes.
This stores the core modules and library files of stl.
This is the entry point script that starts the test execution. It sets environment variables and calls the test runner.
- POSIX Shell Compatibility: Uses POSIX shell-compatible syntax as much as possible to ensure operation in a wide range of environments
- Modularization: Prepares separate scripts for each function, improving maintainability and extensibility
- Utilization of Environment Variables: Sets information necessary for test execution as environment variables and shares them between scripts
- Minimal Dependencies: Minimizes dependencies on external tools, allowing immediate use in many environments
- Flexible Test Structure: Supports setup() and teardown() functions, making it easy to perform pre-processing and post-processing of tests
stl is developed based on these design philosophies and implementation policies, aiming to provide a simple yet effective test environment for shell scripts. It also welcomes continuous improvement and feedback from the community, with the goal of evolving into an easier-to-use and more powerful tool.
- User Manual. Basic usage including naming conventions for test case functions
- Reference: Assertion Functions. Detailed explanation of assertion functions
- Advanced Practical Guide. Advanced usage and practical techniques
- Glossary: Definitions of key terms used in stl