Skip Navigation

Add automated testing to your 
BlackBerry Dynamics
 
iOS
 app

The following steps assume that the target app is already configured to use the 
BlackBerry Dynamics SDK
.
  1. If necessary, create a target in the project to run user interface tests. The target must have the type “iOS UI Testing Bundle”.
  2. Add the 
    BlackBerry Dynamics
     ATSL to the target for UI tests. On the 
    Build Phases
     tab, do the following:
    1. Add 
      BlackBerryDynamicsAutomatedTestSupportLibrary.framework
       to the 
      Link Binary With Libraries
       section.
    2. Create a new 
      Copy Files
       phase. Set 
      Destination
       to 
      Frameworks
       and add 
      BlackBerryDynamicsAutomatedTestSupportLibrary.framework
       to the list.
  3. If the test code is written in 
    Swift
    , you must add the umbrella header to the bridging header, as required by 
    Apple
    . Add 
    "#import <BlackBerryDynamicsAutomatedTestSupportLibrary/AutomatedTestSupportLibrary.h>"
     to the bridging header.
  4. Add or write code for your app tests. Use the helper functions in the ATSL in your test code.
You can use the code for the app tests in any of the sample apps as a starting point. The first app test, 
testProvision
, executes 
BlackBerry Dynamics
 activation and unlock as an automated test.