Back to Homepage
Quality Assurance

Quality Through Simulation & Integrated Test Case Management

Run automated regression tests on agent logic and multi-agent workflows inside a virtual sandbox with integrated test case management before releasing to the factory floor.

Concept & Purpose

Deploying untested AI models into productive IT/OT environments carries substantial risk. Undetected API changes, updated prompt scopes, or model adjustments can cause unpredictable actions.

YAIFA establishes the Simulation Phase as a mandatory quality gate. In this phase, the agent is detached from live systems and executes in a virtual environment (sandbox). System variables, database entries, and sensor telemetry are driven by pre-configured test fixtures managed by the integrated test case management system.

Practical Value

Rather than performing ad-hoc manual tests, YAIFA treats agent configuration updates like standard software code releases:

  • Continuous Regression: Whenever an agent's ports, BDI rules, or code templates are changed, the simulation automatically runs the entire test suite.
  • LLM Drift Detection: Verify that local LLM configurations behave consistently and do not introduce unexpected decision paths.
  • Multi-Agent Coordination: Test complex negotiations (e.g. resource locking or collision paths) between multiple simulated agents before network deployment.
  • Test Case Management: Configure regression test suites, mock environment inputs, and verify BDI behavior in a virtual sandbox before release.

Technical Realization

The YAIFA generator creates a dedicated simulation driver for the agent: yaifa_agent_sim.py. For each port, it generates custom mock modules:

Phase Active Module Exchange Type / Port Configuration
Productive _Source.py Connects to live systems (e.g., OPC-UA server, cloud REST endpoint).
Simulation _Source_SIM.py Redirects input/output to test datasets, local CSV tables, or mock gateways.

During test execution, simulated inputs are fed into the observation pipeline, and assertions are evaluated against outputs and internal BDI state changes:

# Example of a simulation test assertion in tests/test_flow.py
def test_degraded_state_handling():
    # 1. Inject simulated critical temperature input
    simulate_input("port_sensor_temperature", {"value": 92.5})
    
    # 2. Run one deliberation cycle
    agent_sim.run_cycle()
    
    # 3. Assert BDI state updates
    assert agent_sim.beliefs["status"] == "critical"
    assert agent_sim.desires["reduce_load"] is True
    
    # 4. Assert correct output command is written
    actions = fetch_simulated_outputs("port_motor_control")
    assert actions[-1]["setpoint_rpm"] == 500