Preparing for automated testing
You must activate a new installation of a
BlackBerry
Dynamics
app before you can run automated tests. This requires a user identifier (typically an email address), an access key, and a password. The ATSL can read activation credentials from any file in JSON format with the .json extension at the following path: libs/common/gd_automated_test_support/assets.For more information about the required content of the credentials file, see the
com.good.automated.general.utils.GDTestSettings
class. There are different options to prepare the file:
- Manually generate an access key for a user in theUEMor standaloneGood Controlmanagement console, then manually edit the file.
- Manually generate and store a number of access keys in advance, then automatically edit the file and consume a key from the store.
- Automatically generate an access key, and optionally a user, with the BlackBerry Web Services APIs, then automatically edit the file.
Use the option that best suits your needs, based on your access to the management console and administrator level permissions, your familiarity with the BlackBerry Web Services APIs, and your preference for using a new activation for every test or running subsequent tests on the same app as an upgrade.
Please note the following:
- In the JSON file, the access key and unlock key have to be 15 characters and cannot have dashes.
- Automated testing works in Enterprise Simulation mode, but will have the same restrictions (for example, the app cannot connect to any back-end servers).
- EveryBlackBerry Dynamicsapp needs a one-time initialization to complete activation. To ensure that this is executed first, define a dedicated test method that executesBlackBerry Dynamicsactivation and have that activation test executed in isolation.