A robust, test-driven framework for verifying functionality, path planning, and safety protocols of a simulated mobile manipulator robot.
Author: Bang Thien Nguyen
Email: ontario1998@gmail.com
| Component | Technology | Role |
|---|---|---|
| Test Runner | pytest |
Test discovery and execution engine |
| Test Logic | Python Modules (test_*.py) |
Unit, integration, and E2E TDD tests |
| Reporting | Allure, pytest-html |
Interactive and static dashboards |
| Isolation | Docker |
Ensures reproducible, consistent environments |
This framework embodies Test-Driven Development (TDD) β writing tests before implementation β to ensure reliable, modular, and maintainable robotic simulation logic with full test traceability.
π Quick Start (Click to Expand)
- π³ Docker Desktop β Required for containerized testing
- π» Windows Command Prompt β To execute
run_docker.bat - π (Optional) Python 3.10+ β For local runs
- π (Optional) Allure CLI β For interactive reports
git clone git clone https://github.com/luckyjoy/robotics_tdd.git
cd robotics_tdd
pip install -r requirements.txt # Optional for local testingrun_docker.batThis performs:
- Docker validation & cleanup
- Image build β
robotics-tdd-local:latest - Test execution
- Automatic Allure Report launch at http://localhost:8080
pytest --verbose # Run all tests
pytest -m sensors --verbose # Run specific tag
pytest -m "navigation or safety" # Multiple tags
pytest -n auto # Parallel executionrobotics_tdd/
ββ README.md
ββ run_docker.bat # Local entrypoint
ββ Dockerfile # Container definition
ββ Dockerfile.mini # Minimal Docker build file
ββ Dockerfile.report # Docker build file for the report server
ββ .dockerignore # Speeds up builds
ββ Jenkinsfile # CI/CD pipeline
ββ pytest.ini # Test markers
ββ requirements.txt
ββ src/ # Robot simulation logic
ββ supports/ # Configs & Allure metadata
ββ .github/ # GitHub Actions CI/CD workflows
ββ tests/ # Pytest TDD suites
ββ steps/ # Python step definitions (pick_and_place_steps.py, navigation_steps.py, etc.)
ββ simulation/ # Robot simulation and core logic (robot_sim.py, sensors.py)
ββ allure_reports/ # Dynamic history report files
ββ allure-results/ # Raw JSON/XML results (generated during test execution)
| Tag | Focus Area | Description |
|---|---|---|
navigation |
Path Planning | Movement, obstacle avoidance, waypoint following |
pick_and_place |
Manipulation | Arm control, kinematics, object handling |
safety |
System Integrity | Boundary limits, error handling |
walking |
Gait Control | Stability and locomotion |
sensors |
Data Fusion | Sensor accuracy, Kalman Filter validation |
pytest -m "pick_and_place or safety" --alluredir=allure-results
allure serve allure-resultspytest --html=reports/report.html --self-contained-htmlIdeal for CI pipelines and archived documentation.
| Feature | Objective | Value Proposition |
|---|---|---|
| Navigation | Validate safe, collision-free motion | Ensures reliable target reaching |
| Pick & Place | Verify arm dexterity | Guarantees object handling success |
| Safety | Enforce operational constraints | Prevents boundary violations |
| Sensor Fusion | Validate perception accuracy | Confirms Kalman convergence |
| Walking | Test locomotion stability | Maintains posture and control |
| System | Description |
|---|---|
| Jenkinsfile | Automates build β test β report |
| GitHub Actions | Easily adaptable for cloud CI/CD |
| Allure + pytest | Generates professional analytics dashboards |
| Dockerized Execution | Guarantees repeatable test environments |
π Repository: Robotics TDD Framework
π§ Approach: Test-Driven Development (TDD)
π Reporting: Allure + pytest-html
βοΈ CI/CD Integration: Jenkins/Github + Docker
We welcome contributions to improve and expand this framework!
- Fork the repository
- Create a branch:
git checkout -b feature/my-improvement - Write clean, TDD-compliant code
- Run local tests (
pytestorrun_docker.bat) - Submit a Pull Request describing your enhancement
- Follow PEP8 conventions
- Use pytest markers consistently
- Ensure Allure reports run without errors
- Write docstrings for all new functions
Run:
pytest --maxfail=1 --disable-warnings -qand make sure all tests pass locally.
This project is released under the MIT License β free to use, modify, and distribute.
π¬ For collaboration inquiries, reach out at ontario1998@gmail.com
βBuild robots that test themselves before they move β thatβs true autonomy.β
