Skip Navigation

Automated testing with the 
BlackBerry Dynamics
 sample apps

The sample apps included in the 
BlackBerry Dynamics SDK
 have been integrated with the 
BlackBerry Dynamics
 Automated Test Support Library (ATSL). Most Objective-C sample apps include test code that executes automated tests for provisioning and activation, and also demonstrate how to use the library to interact with generic UI components that are not related to 
BlackBerry Dynamics
You can use the integration of the ATSL in any of the sample apps as a guide for integrating the library with your own 
BlackBerry Dynamics
 apps. Note the following details about ATSL integration:
Build target for testing
Each app has an 
 build target that can be used by the XCTest framework.
For more information about how to configure and run user interface tests and view results, see Apple Documentation Archive: Running Tests and Viewing Results
Code for XCUITest tests
The test code is located in the sub-directory 
The code is based on the XCTests framework. Most of the classes relate to user interface testing as 
Use of ATSL for interaction with 
BlackBerry Dynamics
The test code uses helper functions in the ATSL. For example, the code calls the 
 method of the 
 class, which executes the entire activation process.
You can validate ATSL helper function operations using XCTAssert macros. For example, this assertion will fail if activation fails: 
XCTAssertTrue([ats loginOrProvisionBBDApp], @"Activation Failed!");
Use of ATSL for general interactions
The test code also uses helper functions in the ATSL for general interactions, such as checking that an item exists in the user interface and then interacting with that item. The ATSL functions handle this by using XCTestCase and XCUIElement classes.
These functions are defined in the category 
 and the group