Skip Navigation

Preparing for automated testing

As part of your automated testing you must activate a new installation of your
BlackBerry Dynamics
app or log in to an already activated app. This requires a user identifier (typically an email address), an access key, and a password. The ATSL can read activation or login credentials from a file in JSON format stored in the assets folder of the app running the tests.
The file does not have any naming restrictions and must contain a single object with the following fields:
  • GD_TEST_PROVISION_EMAIL: String that specifies the user's email address
  • GD_TEST_PROVISION_ACCESS_KEY: String that specifies the access key
  • GD_TEST_PROVISION_PASSWORD: String that specifies the user's password after provisioning or during login
  • GD_TEST_UNLOCK_KEY: Specifies the unlock key, if necessary (optional)
For example:
{ "GD_TEST_PROVISION_EMAIL": "user@acme.com", "GD_TEST_PROVISION_ ACCESS_KEY": "012345678901234", "GD_TEST_PROVISION_PASSWORD": "abcd" }
There are different options to prepare the file:
  • Manually generate an access key for a user in the management 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).
  • Every
    BlackBerry Dynamics
    app needs a one-time initialization to complete activation. To ensure that this is executed first, define a dedicated test method that executes
    BlackBerry Dynamics
    activation and have that activation test executed in isolation.