Skip to content

Add E2E integration tests for MQTT bridge, CLI, and device profiler #242

Description

@groupsky

Summary

The E2E testing infrastructure is now in place (PR #236), but the actual integration tests for the following components are not yet implemented:

Test Scenarios to Implement

1. MQTT Bridge Tests

  • Single device: Bridge publishes data to MQTT topics
  • Multiple devices: Correct polling and topic separation
  • Bus contention: No mutex issues with concurrent device access
  • Error handling: Device disconnection and reconnection
  • Data accuracy: Published values match emulator configuration

2. CLI Tests

  • ya-modbus read: Reads correct values from emulated devices
  • ya-modbus write: Updates registers successfully
  • ya-modbus list-devices: Shows available drivers
  • Error handling: Invalid commands, connection failures
  • Help text: Displays correctly

3. Device Profiler Tests

  • Device discovery: Finds devices on serial port
  • Slave ID detection: Identifies correct slave IDs
  • Baud rate detection: Detects communication parameters
  • Device type identification: Matches known driver patterns

Infrastructure Ready

The test infrastructure from PR #236 provides:

  • ✅ Virtual serial ports (socat)
  • ✅ Emulator with RTU transport
  • ✅ MQTT broker (Docker Compose)
  • ✅ BATS test framework
  • ✅ Helper functions and setup scripts
  • ✅ CI/CD workflow

Related

Part of the E2E testing roadmap. Infrastructure completed in PR #236.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions