Skip to content

luckyjoy/robotics_tdd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Robotics Test-Driven Development (TDD) Framework

A robust, test-driven framework for verifying functionality, path planning, and safety protocols of a simulated mobile manipulator robot.


Build Status Docker Python Allure Report License


πŸ‘€ Author & Contact

Author: Bang Thien Nguyen
Email: ontario1998@gmail.com


πŸ› οΈ Core Technologies

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

πŸ’‘ Project Overview

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)

βœ… Prerequisites

  • 🐳 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

βš™οΈ Installation

git clone git clone https://github.com/luckyjoy/robotics_tdd.git
cd robotics_tdd
pip install -r requirements.txt  # Optional for local testing

πŸ§ͺ Run Tests with Docker (Recommended)

run_docker.bat

This performs:

  1. Docker validation & cleanup
  2. Image build β†’ robotics-tdd-local:latest
  3. Test execution
  4. Automatic Allure Report launch at http://localhost:8080

🧩 Local Test Execution

pytest --verbose                   # Run all tests
pytest -m sensors --verbose        # Run specific tag
pytest -m "navigation or safety"   # Multiple tags
pytest -n auto                     # Parallel execution

🌳 Framework Architecture

robotics_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)


🏷️ Test Tags and 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

πŸ“Š Professional Reporting

🧠 Allure Interactive Dashboard

pytest -m "pick_and_place or safety" --alluredir=allure-results
allure serve allure-results

πŸ“Έ Preview: Allure Report Preview


πŸ“˜ Static HTML Report (pytest-html)

pytest --html=reports/report.html --self-contained-html

Ideal for CI pipelines and archived documentation.


🧭 Test Coverage Summary

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

βš™οΈ CI/CD Integration

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


πŸ“ˆ Example CI/CD Badges

Jenkins GitHub Actions Allure Tests


🀝 Contributing Guidelines

We welcome contributions to improve and expand this framework!

🧩 How to Contribute

  1. Fork the repository
  2. Create a branch: git checkout -b feature/my-improvement
  3. Write clean, TDD-compliant code
  4. Run local tests (pytest or run_docker.bat)
  5. Submit a Pull Request describing your enhancement

βœ… Code Style

  • Follow PEP8 conventions
  • Use pytest markers consistently
  • Ensure Allure reports run without errors
  • Write docstrings for all new functions

πŸ§ͺ Before Submitting

Run:

pytest --maxfail=1 --disable-warnings -q

and make sure all tests pass locally.


πŸͺͺ License

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.”

Releases

No releases published

Packages

No packages published