How nicolelwl85/taurus works
Project Type and Purpose
• Taurus is a Python-based, open-source command-line tool that provides a unified wrapper over performance/functional testing engines (JMeter, Gatling, Locust, Grinder, Selenium WebDriver, etc.).
• Its goal is to hide the complexity of those tools behind a simple YAML-based configuration and a single CLI (bzt).
Key Components from File Structure
• CLI & Entry Point:
• bzt/cli.py – parses commands and options, loads configuration, invokes the Engine
• bzt/__init__.py, bzt/bza.py – package entry
• Core Engine & Workflow:
• bzt/engine.py – orchestrates test execution lifecycle
• bzt/utils.py – shared utilities
• bzt/requests_model.py – internal request abstraction
• Plugin Modules (bzt/modules):
• executor modules (jmeter, gatling, locustio, grinder, siege, soapui, tsung, etc.)
• functional modules (selenium, chrome, javascript, python, ruby)
• provisioning modules (cloud, local)
• aggregator modules (defaultAggregator, functionalAggregator, consolidatingAggregator)
• reporting modules (console, JUnitXML, HTML, BlazemeterUploader)
• monitoring modules
• pass/fail modules
• Resources (bzt/resources):
• Templates and helper scripts for each engine (JMX-to-YAML, wrappers, config templates)
• Tests & Examples:
• tests/ – unit tests for every module, engine, CLI command
• examples/ – sample YAML scenarios for each engine and framework
• Documentation Site (site/):
• PHP and Markdown files driving the project website and knowledge base
• Packaging & Deployment:
• setup.py, Dockerfile, build scripts, Travis/AppVeyor, installer scripts
a. Components to Represent
1. CLI Layer (bzt CLI)
2. Configuration Parser (YAML reader)
3. Core Engine Scheduler
4. Plugin Loader & Module Registry
5. Executor Modules (one per tool)
6. Provisioning Modules (cloud/local)
7. Aggregator & Pass/Fail Modules
8. Reporter Modules (console, files, remote API)
9. External Tools & Services (JMeter, Gatling, Selenium, Locust, Grinder, Blazemeter API)
10. File System (resources, templates, output artifacts)
11. Documentation Site Generator (site/) – optional in core diag
b. Relationships & Data Flows
• User runs bzt test.yml → CLI Layer
• CLI invokes Configuration Parser → produces internal config model
• Core Engine Scheduler uses Module Registry to instantiate:
• Provisioning → prepares environment (cloud or local)
• Executors → launch underlying tools with generated configs or scripts
• Aggregators & Monitors → collect metrics in real time
• Reporters → consume aggregated results, output to console/files or upload
• Executors interact with External Tools/Services (shell, REST, Java processes)
• Resources folder supplies templates and scripts to Executors
• Test artifacts (logs, metrics, reports) written to output directory
c. Architectural Patterns & Design Principles
• Plugin architecture: each module implements a common Executor/Reporting interface for extensibility
• Separation of concerns: clear layers for CLI, engine orchestration, execution, aggregation, reporting
• YAML configuration driven: decouples user config from execution logic
• Dependency injection via module registry
d. Key Technologies & Frameworks
• Python 3.x (backwards‐compat via bzt/six)
• PyPI packaging (setup.py)
• YAML parsing (PyYAML)
• Subprocess / threading for tool invocation
• REST clients for cloud/Blazemeter integration
• Java wrappers/plugins for TestNG/JUnit (in java/ folder)