Skip to content

Initial usage of ArduCopter SITL to test the flightcontroller backend#994

Merged
amilcarlucas merged 4 commits into
masterfrom
SITL_tests
Nov 24, 2025
Merged

Initial usage of ArduCopter SITL to test the flightcontroller backend#994
amilcarlucas merged 4 commits into
masterfrom
SITL_tests

Conversation

@amilcarlucas

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions

github-actions Bot commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

Test Results

    3 files  ±  0      3 suites  ±0   56m 3s ⏱️ + 53m 18s
2 274 tests +200  2 258 ✅ +186  2 💤 ±0  14 ❌ +14 
6 822 runs  +600  6 774 ✅ +558  6 💤 ±0  42 ❌ +42 

For more details on these failures, see this check.

Results for commit 8ee6ef3. ± Comparison against base commit 35dfc9e.

This pull request removes 110 and adds 310 tests. Note that renamed tests count towards both.
tests.test_backend_flightcontroller ‑ test_add_connection
tests.test_backend_flightcontroller ‑ test_auto_detect_serial
tests.test_backend_flightcontroller ‑ test_connect
tests.test_backend_flightcontroller ‑ test_create_connection_with_retry
tests.test_backend_flightcontroller ‑ test_disconnect
tests.test_backend_flightcontroller ‑ test_discover_connections
tests.test_backend_flightcontroller ‑ test_download_params
tests.test_backend_flightcontroller ‑ test_download_params_via_mavftp
tests.test_backend_flightcontroller ‑ test_get_connection_tuples
tests.test_backend_flightcontroller ‑ test_list_network_ports
…
tests.test_backend_flightcontroller.TestFlightControllerBatteryMonitoringWorkflow ‑ test_user_can_enable_battery_monitoring_for_flight_safety
tests.test_backend_flightcontroller.TestFlightControllerBatteryMonitoringWorkflow ‑ test_user_can_verify_battery_monitoring_configuration
tests.test_backend_flightcontroller.TestFlightControllerConnectionLifecycle ‑ test_user_can_connect_to_sitl_for_development_testing
tests.test_backend_flightcontroller.TestFlightControllerConnectionLifecycle ‑ test_user_can_disconnect_cleanly_after_configuration
tests.test_backend_flightcontroller.TestFlightControllerConnectionLifecycle ‑ test_user_can_establish_connection_to_hardware_flight_controller
tests.test_backend_flightcontroller.TestFlightControllerConnectionLifecycle ‑ test_user_can_initialize_flight_controller_for_configuration
tests.test_backend_flightcontroller.TestFlightControllerErrorHandlingAndRecovery ‑ test_user_can_recover_from_connection_failures
tests.test_backend_flightcontroller.TestFlightControllerErrorHandlingAndRecovery ‑ test_user_gets_clear_error_when_connection_lost
tests.test_backend_flightcontroller.TestFlightControllerErrorHandlingAndRecovery ‑ test_user_gets_timeout_error_for_nonexistent_parameters
tests.test_backend_flightcontroller.TestFlightControllerMotorTestingWorkflow ‑ test_motor_testing_handles_connection_failures_gracefully
…

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
9656 8483 88% 80% 🟢

New Files

File Coverage Status
ardupilot_methodic_configurator/backend_flightcontroller_business_logic.py 100% 🟢
ardupilot_methodic_configurator/backend_flightcontroller_commands.py 91% 🟢
ardupilot_methodic_configurator/backend_flightcontroller_connection.py 91% 🟢
ardupilot_methodic_configurator/backend_flightcontroller_factory_mavftp.py 100% 🟢
ardupilot_methodic_configurator/backend_flightcontroller_factory_mavlink.py 100% 🟢
ardupilot_methodic_configurator/backend_flightcontroller_factory_serial.py 100% 🟢
ardupilot_methodic_configurator/backend_flightcontroller_files.py 98% 🟢
ardupilot_methodic_configurator/backend_flightcontroller_params.py 96% 🟢
ardupilot_methodic_configurator/backend_flightcontroller_protocols.py 100% 🟢
TOTAL 97% 🟢

Modified Files

File Coverage Status
ardupilot_methodic_configurator/backend_flightcontroller.py 99% 🟢
ardupilot_methodic_configurator/configuration_manager.py 77% 🟢
ardupilot_methodic_configurator/data_model_motor_test.py 72% 🟢
ardupilot_methodic_configurator/data_model_par_dict.py 100% 🟢
ardupilot_methodic_configurator/frontend_tkinter_flightcontroller_info.py 100% 🟢
TOTAL 89% 🟢

updated for commit: b4fb877 by action🐍

Copilot AI review requested due to automatic review settings November 3, 2025 01:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Add BDD tests to reach 100% coverage
…ed managers using delegation pattern

Splits monolithic 820-line FlightController class into focused component managers:
- FlightControllerConnection: port discovery, connection lifecycle, heartbeat detection
- FlightControllerParams: parameter download, upload, querying via MAVLink/MAVFTP
- FlightControllerCommands: motor tests, battery status, command execution
- FlightControllerFiles: file upload/download via MAVFTP

Introduces protocol-based interfaces for dependency injection and testing.
Connection manager is single source of truth for master, comport, and info state.
Params manager is single source of truth for fc_parameters state.
Documents error handling standards and testing patterns in ARCHITECTURE.md.
@amilcarlucas amilcarlucas merged commit 90505e5 into master Nov 24, 2025
26 of 31 checks passed
@amilcarlucas amilcarlucas deleted the SITL_tests branch November 24, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants