Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Testing and Deployment

Automate testing with the BlackBerry Simulator

by Retired on ‎02-17-2010 01:21 PM (2,412 Views)


This article applies to the following:

  • BlackBerry® Java™ Development Environment (JDE) 4.0 and later
  • BlackBerry device simulator 4.0 and later


With BlackBerry JDE 4.0 and any related BlackBerry device simulator 4.0, a new and improved simulator is provided, which closely resembles the operating environment of the BlackBerry device. One of the new features provided with the updated simulator is the ability to leverage controller commands. Controller commands can be used to instruct the simulator to perform certain operations from a script.

The new simulator is called Fledge, and the fledgecontroller.exe file is the executable for controlling the simulator. There are two typical mechanisms for invoking fledgecontroller:

  1. Through the use of an execute command. If /execute is used, the command is sent, and fledgecontroller exits.
  2. From standard input. If /execute is not used, commands are sent from standard input.

To invoke the fledgecontroller, use the following:

fledgecontroller /session={name} [/execute={command}] [/timeout={time-in-seconds}] [/get-sessions]

The Fledge simulator provides significant documentation on the different types of commands that can be used with fledgecontroller. By typing fledge.exe /controller-help you can get more information on the different commands and how to use them.

There are five main categories of events that can be provided to control the simulator:

  1. Application - controls the behaviour and appearance of the simulator application itself.
  2. Environment - manipulates the surrounding environment of the BlackBerry device.
  3. Input - generates keypad and input BlackBerry device events.
  4. Network - generates data and phone events.
  5. Peripheral - generates peripheral events.

The Input commands are the most valuable commands for automated testing of your application in a simulated environment. The input commands allow developers to script tests with key injections, string injections, trackwheel clicks, escape keys, and other critical navigational techniques on the BlackBerry device. Through the use of the input commands alone, application vendors can automate a significant amount of manual testing.

For location-based services, the Environment commands allow you to specify longitude and latitude in an automated fashion. This allows location-based services vendors to programmatically set up routes and other tests for their applications (via the JSR 179 standard) using fledgecontroller.

With the flexibility provided by the fledgecontroller tool, developers can start automating manual testing with the BlackBerry device simulator. This in turn will enhance testing for applications and refocus existing resources on new tasks.

Users Online
Currently online: 39 members 2,592 guests
Please welcome our newest community members: