Introduction to Multiple HMIs Testing
Modern Human-Machine Interface (HMI) devices rarely function as standalone systems. Instead, they interact with other HMI devices to deliver comprehensive functionalities for the user. This interconnection emphasises the importance of Multiple HMIs Testing, as it adds significant complexity to both the development and testing of such systems. Ensuring seamless integration and communication between devices requires robust testing strategies.
In this article, we’ll explore how AuroraTests Framework empowers testers to validate interactions between two HMI devices, using a Bluetooth connectivity scenario as an example.
Challenges of Testing Multiple HMIs
As the complexity of HMI ecosystems grows, testing these systems becomes increasingly critical. Whether it’s an automotive dashboard interacting with a smartphone or a smart appliance syncing with a home assistant, ensuring seamless interaction is vital for user satisfaction and safety.
Key challenges addressed by AuroraTests FW:
- Integration Assurance: Verify that multiple devices communicate effectively.
- User Experience Optimization: Ensure flawless functionality under real-world scenarios.
- Reduced Development Time: Catch and resolve issues early in the testing phase.
AuroraTests FW simplifies these challenges by enabling simultaneous testing of multiple interacting HMIs within a single test.
System Under Test
Our test scenario involves two Android-based HMI devices: a Head Unit and a Phone. These devices need to establish a Bluetooth connection to provide features such as hands-free calling and media streaming.
Test Scenario: Ensuring Reliable Bluetooth Connectivity
Testing Bluetooth connectivity involves verifying that devices can pair, communicate, and disconnect without issues.
Below are the key scenarios tested:
Test Case | Given (precondition) | When (action/input) | Then (result/output) |
Pair a New Device |
|
|
|
Forget Device on Head Unit |
|
|
|
Forget Device on Phone |
|
|
|
The HMI Tests Code
The testing code utilizes a single helper class, BtConnectivityTester, to optimize interactions with the Android-based HMIs. This unified approach works seamlessly for both devices, as they share similar menu structures and functionality.
By using it, the “Pair a New Device” test case looks very simple:
rom aurora_tests.pytest.fixtures import device_display, device_touches, device_buttons, device_resources
from bt_connectiviy_tester import BtConnectivityTester
# Device constants for easy reference
DEV_HU = "HeadUnit" # Represents the Head Unit device
DEV_PH = "Phone" # Represents the Phone device
def test_pair_new_device(device_display, device_touches, device_buttons, device_resources):
"""
Example usage of the BtConnectivityTester helper class to automate pairing
between a Head Unit and a Phone.
This test demonstrates:
1. Opening the Bluetooth settings on the Head Unit.
2. Unlocking the Phone using a PIN.
3. Opening the Bluetooth settings on the Phone.
4. Initiating a pairing request from the Phone to the Head Unit.
5. Accepting the pairing request on both devices.
6. Verifying that both devices are paired with each other.
"""
# Instantiate a BtConnectivityTester for the Head Unit
head_unit = BtConnectivityTester(
display=device_display[DEV_HU],
touches=device_touches[DEV_HU],
buttons=device_buttons[DEV_HU],
resources=device_resources[DEV_HU]
)
# Instantiate a BtConnectivityTester for the Phone
phone = BtConnectivityTester(
display=device_display[DEV_PH],
touches=device_touches[DEV_PH],
buttons=device_buttons[DEV_PH],
resources=device_resources[DEV_PH]
)
# Step 1: Open the Settings app and navigate to the "Connected devices" menu on the Head Unit
assert head_unit.open_app("Settings")
assert head_unit.open_settings_menu("Connected devices")
# Step 2: Unlock the Phone using its PIN code
assert phone.unlock("2211")
# Step 3: Open the Settings app and navigate to the "Connected devices" menu on the Phone
assert phone.open_app("Settings")
assert phone.open_settings_menu("Connected devices")
# Step 4: Initiate a pairing request from the Phone to the Head Unit
assert phone.request_to_pair("Head Unit")
# Step 5: Accept the pairing request on both devices
assert head_unit.accept_to_pair()
assert phone.accept_to_pair()
# Step 6: Verify that both devices are paired with each other
assert head_unit.is_paired_to_device("moto e13")
assert phone.is_paired_to_device("Head Unit")
Benefits of Multiple HMIs Testing with AuroraTests
AuroraTests FW is a reliable framework for multiple HMIs testing, offering:
- Scalability: Easily add more devices and test scenarios.
- Flexibility: Adapt to various system configurations and setups.
- Consistency: Execute tests uniformly across different devices.
- Fully Automated Testing: Doesn’t require any manual actions from the tester.
Simplify Multiple HMIs Testing with AuroraTests
In this blog post, we showcased how AuroraTests FW simplifies multiple HMIs testing, exploring its ability to manage Bluetooth connectivity scenarios between a Head Unit and a Phone. Using the AuroraTests FW APIs, we demonstrated how to efficiently handle interactions between multiple devices in one test.
AuroraTests offers a robust and flexible framework for handling complex multi-device scenarios, simplifying the testing process for interconnected HMI systems. We hope this demonstration inspires you to leverage its capabilities for your own projects.
Contact us at info@datajob.se to learn how AuroraTests can integrate into your HMI testing workflow or schedule a personalized demo to test this powerful framework.
Additional Resources
- Full Code Examples – Explore the complete implementation of all test cases discussed.
- Test Execution Videos – Recordings of the tests being executed for a detailed view of the process (Pair a New Device and Forget Device on Phone and Head Unit)