1

I want to automatically test an app that enables users to message each other. To do so, I need to make sure that I can receive messages on device A that were sent from device B. What's a good way to do this?

According to Is there a way to simulate multiple iphones using xcode/iphone sim?, it was completely impossible five years ago. Is that still the case?

Community
  • 1
  • 1
  • I would set-up some sort of dummy test server, written in python to act as a chat partner during testing. You only need to test how one client reacts to certain networked responses; it's not necessary to test multiple clients at the same time. – trojanfoe May 15 '15 at 07:24

2 Answers2

0

Yes, unfortunately the iOS Simulator doesn't allow you to run multiple devices at once. You may need to have two Macs running at the same time, but that wouldn't be feasible for scale either.

If you're unit-testing, since I can see the tag in this question, simply mock the service responsible for notifying you of new messages and make it return a stubbed response for a number of messages you send in the tests.

Gianluca Tranchedone
  • 3,598
  • 1
  • 18
  • 33
0

Build two apps on a device with two different bundle identifiers. This will allow you to have two different versions of the app on the device. From there you can just log on to each version with different logins.

OdieO
  • 6,836
  • 7
  • 56
  • 88