Testing a BlackBerry device application
9
Testing applications on a BlackBerry Smartphone Simulator
After you develop and compile your application, you can test it on the BlackBerry® device. The most common first step is to set
the BlackBerry® Java® Development Environment to use a BlackBerry® Smartphone Simulator. The BlackBerry Smartphone
Simulator runs the same Java code as the BlackBerry devices, so the BlackBerry Smartphone Simulator provides an accurate
environment for testing how applications will function on a BlackBerry device. The BlackBerry JDE includes current versions of
the BlackBerry Smartphone Simulator. To download additional versions of the BlackBerry Smartphone Simulator, visit
www.blackberry.com/developers/index.shtml
.
Testing applications on a BlackBerry device
After you test your application on the BlackBerry® Smartphone Simulator, you can install your application on a BlackBerry device.
If your application uses signed APIs, you might need code signing keys. After you install the application on the BlackBerry device,
you can open the application and test its functionality and performance.
For debugging purposes, you can attach your device to the BlackBerry® Integrated Development Environment and use the
debugging tool to step through your application code. The BlackBerry IDE can be useful if you are trying to identify a network or
Bluetooth® issue, or other issues that are difficult to simulate.
Testing applications using the compiled .cod files
When you build a project using the BlackBerry® Integrated Development Environment, the BlackBerry IDE compiles your source
files into Java® bytecode, performs preverification, and creates a single .cod file and .jad file for a BlackBerry® device application.
If a BlackBerry device application contains more than 64 KB of bytecode or resource data, the BlackBerry IDE creates a .cod file
that contains sibling .cod files. Only the BlackBerry® Browser supports wireless installation of a .cod file that contains sibling .cod
files. To determine if a .cod file contains sibling .cod files, extract the contents of the .cod file. Any .cod files within the original .cod
file are the sibling files.
To identify modules that a BlackBerry device application requires, but are not provided with it, examine the Java® application
descriptor (.jad) file RIM-COD-Module-Dependencies attribute.
Development Guide
Testing a BlackBerry device application
87