add-test

Create EmbodiChain test files with pytest or SimulationManager class-style structure.

206|20|Updated Oct 24, 2025
One-click install
npx skills add https://github.com/DexForce/EmbodiChain --skill add-test-dexforce
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-test
Source: https://github.com/DexForce/EmbodiChain/tree/main/skills/add-test
Command: npx skills add https://github.com/DexForce/EmbodiChain --skill add-test-dexforce

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you add reliable test coverage to EmbodiChain modules so changes don’t break observation functors, reward functors, solvers, sensors, or environments.

Core Features & Use Cases

  • Test placement & naming: Mirrors the embodichain/ source tree under tests/ and uses the test_<module>.py convention.
  • Choose the right test style: Uses pytest style for pure-Python logic and class-style tests when you need SimulationManager, GPU setup, or ordered/shared state.
  • Practical mocking patterns: Provides MockSim/MockEnv guidance for fast functor tests without running a real simulation.
  • Execution readiness: Enforces key conventions like the Apache 2.0 header, required from __future__ import annotations, descriptive test_<scenario> naming, and black formatting.

Quick Start

Tell the AI which EmbodiChain module or function you want to test, whether it needs a live SimulationManager, and the behaviors you must verify.

Frequently Asked Questions about add-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write unit tests for Embodied AI modules that depend on GPU simulations?

For fast unit tests without running a real GPU simulation, use mocking patterns like MockSim and MockEnv to isolate and test observation functors, reward functors, and sensors quickly.

What is the correct file placement convention for testing observation functors and sensors?

The correct file placement convention for testing observation functors and sensors is to mirror the embodichain source tree under the tests directory using the test_<module>.py naming format.

When should I use pytest functions instead of class-style tests for Python components?

Use pytest functions for pure-Python logic components, and switch to class-style tests when your modules require SimulationManager, GPU setup, ordered execution, or shared state across test methods.

What required headers and annotations should my test files include for repository conventions?

Test files must include the Apache 2.0 license header and the required from __future__ import annotations statement, use descriptive test_<scenario> naming, and be formatted with black to pass repository checks.

Can I use mocking patterns for fast functor tests without a live SimulationManager?

Yes, you can use MockSim and MockEnv mocking patterns to create fast functor tests without running a live SimulationManager, allowing you to verify observation and reward logic efficiently.

How to choose the right testing style for pure-logic versus simulation-dependent EmbodiChain behavior?

Choose pytest style for pure-logic Python components and class-style tests for simulation-dependent behavior, ensuring tests align with repository conventions for either approach.