# Sensor Test Framework Documentation

## Adding New Experiments
1. Create experiment Python file in `sensors/experiments/cam/colorchecker/`
2. Basic structure (cam_colorchecker_exp1.py example):
```python
from evolve.evolve_core.experiment import ExperimentAPI

class CamColorcheckerExp1(ExperimentAPI):  # Must inherit from ExperimentAPI
    ...
```

## Adding New KPIs
1. Create KPI Python file in `sensors/kpis/` (e.g. camera_colorchecker_kpi.py)
2. Basic structure (must inherit from base KPI class):
```python
from evolve.evolve_core.basic_definitions import KPI

class CameraColorcheckerKpi(KPI):  # Must inherit from BaseKPI
    ...
```

## Test Configuration Example
Add to test array in `tests.json`:
```json
[
    {
        "experiments": ["CamColorcheckerExp1"],
        "kpis": ["CameraColorcheckerKpi"]
    },
    {
        "experiments": ["ExpABC,ExpDEF"],
        "kpis": ["KPIXY, KPIZA"]
    }
]
```
multiple experiments and kpis can be added to the same test

## Running Tests
1. First install dependencies:
```bash
poetry install
```

2. Use `run.sh` with options:
```bash
# Run all tests based on tests.json
./run.sh

# Run specific tests from tests.json with matching pattern
./run.sh --experiment-pattern Cam.* --kpi-pattern Camera.*

```









