Skip to content

Multi-device interactive testing - How to test flows requiring 2+ devices? #2957

@LucaL1fe

Description

@LucaL1fe

Use case

Problem

I cannot find any documentation or solution for testing scenarios that require interaction between two devices.

My app is a simple messaging app (like WhatsApp for Parent and Children). Almost all my test flows require this pattern:

  1. Device A (Parent) → Create an invitation code
  2. Device B (Child) → Enter that invitation code
  3. Device A (Parent) → Send message "Hello Sarah"
  4. Device B (Child) → Verify message "Hello Sarah" was received

Every meaningful test in my app needs this: I do something on Device A, then verify the result on Device B.

What I've Found

  • --shard-all / --shard-split → Runs same/split tests in parallel, but no communication between devices
  • --driver-host-port → Allows running multiple Maestro instances, but no synchronization mechanism

Current Workaround (Painful)

The only solution I can think of is writing a huge orchestrator script in Python/Bash, splitting every single step into its own YAML file:

test_orchestrator.py
run_test("device1", "01_create_invitation.yaml")
code = read_file("/tmp/code.txt")
write_file("/tmp/code.txt", code)
run_test("device2", "02_enter_invitation.yaml")
run_test("device1", "03_send_message.yaml")
run_test("device2", "04_verify_message.yaml")
... and so on

Use Cases

This would enable testing for:

  • 📱 Messaging apps (sender ↔ receiver)
  • 🎮 Multiplayer games
  • 🔗 Invitation/referral systems
  • 👥 Collaborative apps
  • 🔔 Push notification verification

Questions

  1. Is there an official way to do this that I'm missing?
  2. Is this on the roadmap?

Thanks for building such an amazing tool! This feature would make it perfect for social/collaborative app testing.

Proposal

add a switch device command to yaml

do ...

switch device to: ...

check...

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions