How to Run the same test on both Android and iOS

Even though Android and iOS environments are vastly different, but given BQs paradigm of write once and execute anywhere, the same test can be executed on both Android and iOS. This feature comes with the following caveats :

  • App workflow should be the same for both Android and iOS
  • UI elements use IDs in both application variants

However, we understand that maintaining these constraints requires a lot of discipline and may not be met. In this situation we have the following ways to work with slightly different variants:

  1. In case app workflows differ between Android and iOS, you can write steps that differ between the variants inside conditional keywords ifAndroid and ifIOS.
  2. If apps use different UI elements to leverage device’s native capabilities, you can record the test on any variant and then leverage BQ Genie Scanner to update UI elements for the second variant.