Running Tests
After generating test cases and writing your tests, you can execute the main command for testing:
teapie
TeaPie supports two execution modes:
- Collection Run - If a directory path is provided, tool runs all test cases found in the specified folder and its subfolders.
- Single Test-Case Run - If a
.http
file path is provided, then tool executes only that specific test case.
Both single test case and collection runs follow these two main steps:
- Structure Exploration β TeaPie scans the directory or test-case structure to identify all test cases and related files.
- Test Execution β Each detected test is executed based on the provided configuration.
Advanced Usage
For more advanced usage, hereβs the full command specification:
teapie test [path-to-collection-or-test-case] [--temp-path <path-to-temporary-folder>] [-d|--debug] [-v|--verbose] [-q|--quiet] [--log-level <minimal-log-level>] [--log-file <path-to-log-file>] [--log-file-log-level <minimal-log-level-for-log-file>] [-e|--env|--environment <environment-name>] [--env-file|--environment-file <path-to-environment-file>] [-r|--report-file <path-to-report-file>] [-i|--init-script|--initialization-script <path-to-initialization-script>] [--no-cache-vars|--no-cache-variables]
πββοΈ You can use alias
t
or completely omit command name, sincetest
command is considered as default command when launchingteapie
.
To view detailed information about each argument and option, run:
teapie --help
Test Results
Test results can be accessed in the following ways:
- Console output: Displays a visually structured summary of test results in the end of application run.
- JUnit XML report: Use the
-r
or--report-file
option to generate a report compatible with CI tools. - Exit codes: Useful for scripting and automation:
0
β Successful execution; all tests passed (or no tests were found).1
β An error occurred during application execution.2
β Execution succeeded, but some tests failed (commonly treated as a failure in CI/CD).130
β Premature termination viaCtrl+C
(note: not fully supported yet).