vendredi 26 août 2016

How to unit test Bluetooth accessories?

I have an application with an Android and an iOS version, both of which function primarily by connecting and sending/receiving messages to/from Bluetooth accessories.

  • iOS uses ExternalAccessory to connect to Bluetooth devices
  • Android uses BluetoothDevice to connect to Bluetooth devices

I want to write unit tests to make them reliable.

Note that I am not looking to test what it sends/receives to the bluetooth device based on input/output (I already have that tested with stream wrappers). I need to test behavior like:

  • The bluetooth accessory has disconnected in the middle of an operation
  • A connection has failed

How to go about it?

Aucun commentaire:

Enregistrer un commentaire