Setting up test targets

A test target refers to a BlackBerry device or simulator that you use to test your app. You can define one or more targets.

Targets are created outside of your project. Any targets you create are available for use by any projects you are working on. You can define as many targets as you have device or simulator PINs. In each case, you specify a unique target ID and associate that ID with a specific PIN. Then, when you deploy your app to a particular target device or simulator, you can simply refer to that target by ID.

If you attach a device over USB or launch the simulator, the tools will auto-detect those targets. You only need to set a test target manually if you want to deploy your app over Wi-Fi or when you have multiple simulators or devices that you want to test on.

Set up targets using the SDK web tool

To set up a test target:

  1. Open BlackBerry WebWorks <version>. A new browser window opens, displaying the BlackBerry 10 WebWorks SDK web tool.
  2. In the navigation panel, click Target Management.
  3. In the Target Name field, specify a unique name for the target.
  4. In the Target IP field, specify the IP address of the device or simulator. For information on how to locate the IP address, see Find the IP address for your target.
  5. In the Target Password field, specify the password for the device or simulator.
  6. In the Target PIN field, specify the PIN of the device or simulator.
  7. In the Target Type drop-down, specify whether the test target you've defined is a BlackBerry 10 device, or a BlackBerry 10 Device Simulator.
  8. Click Update Target List.

The target is added to the target list. You can remove or edit the values for any of your test targets at any time.

Set up targets from the command line

Set up your simulator or device as a target

To set up your device or simulator as target:

  1. On the command line, run the following command:
    webworks target add <target_id> <ip-address> [ -t device | simulator]  [-p <password>]  [--pin <device-pin>]
For example, the following command defines the simulator as a target with an ID of mysim:
webworks target add mysim -t simulator --pin FFFF9B90

Check the table below for details for each parameter.

Parameter Description

A unique name for the target.


The IP address of the BlackBerry device or simulator.

-t device | simulator

The target type. If not provided, the default value is device.

-p <password>

The password for the device or simulator. This argument is required only if the device or simulator is password-protected.

--pin <device-pin>

The PIN of the BlackBerry device, which identifies that device as a valid host for the debug token. This argument is required only if you are creating a debug token.

Removing a target

To remove an existing target:

  1. On the command line, navigate to your project folder.
  2. Run the following command:
    webworks target remove <target_id>

Viewing existing targets

To view a list of existing targets:

  1. On the command line, navigate to your project folder.
  2. Run the following command to view your list of targets:
    webworks target 

Find the IP address for your target

To create a target, you need the IP address of your device or simulator. To get the IP address, follow the steps below.

On a BlackBerry 10 device:

  1. On the home screen, swipe down from the top of the screen or find the Settings app on your home screen.
  2. Navigate to Settings > About.
  3. In the Category drop-down list, click Network.
  4. Under the Wi-Fi heading, note the value under IPv4. This is the IP address you should be supplying when setting up the device as a test target.

    To view the Wi-Fi section on the Network Settings page, you must have Wi-Fi turned on, and the device must be connected to the Wi-Fi network.

On the BlackBerry 10 Device Simulator:

  1. Start the BlackBerry 10 Device Simulator.
  2. In the lower-left corner of the simulator window, note the IP address:This image shows the location of the simulator IP address.

Last modified: 2014-10-09

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus