Principle:Facebookresearch Habitat lab Integration Testing
| Knowledge Sources | |
|---|---|
| Domains | Testing, Software_Architecture |
| Last Updated | 2026-02-15 02:00 GMT |
Overview
Validation of custom Habitat components by running them in a live environment to verify correct observation shapes, metric values, and action effects.
Description
Integration Testing verifies that custom sensors, measures, and actions work correctly when composed into a live Habitat environment. This involves creating an Env or HabGymWrapper with the custom components wired in, running episodes, and asserting that: sensor observations have the expected shapes and value ranges, measures produce valid metrics, and actions have the expected effects on simulation state.
Usage
Perform as the final validation step after defining, registering, and wiring custom components. Test with both habitat.Env (native API) and HabGymWrapper (Gym API) to ensure compatibility.
Theoretical Basis
Integration testing follows a standard pattern:
# Abstract integration test
env = create_env_with_custom_components(config)
obs = env.reset()
assert "my_sensor" in obs
assert obs["my_sensor"].shape == expected_shape
obs, reward, done, info = env.step(action)
assert "my_measure" in info["metrics"]
assert isinstance(info["metrics"]["my_measure"], float)