Konrad Zielinski
Konrad Zielinski

Reputation: 91

BlackBerry automatic deployment/testing

I am trying to automate deployment to BlackBerry devices. My overall goal is to use a script to install an app to a BlackBerry device, run a test suite and finally download the log file.

I know it is possible to build and install using ANT scripts, and downloading the log file can be done using javaloader, but the running of a test suite I am finding problematic.

Is there any way to launch apps on a device? Or at least send input events? I think fledge and fledgecontroller has some of these capabilities, but I am looking to do this on a physical device.

Upvotes: 3

Views: 95

Answers (1)

Eugen Martynov
Eugen Martynov

Reputation: 20130

We have own automated test:

  1. Own kind of j2meunit which produce output in junit format
  2. The additional application that runs it
  3. ant task that builds, starts fledge, waits until tests are done
  4. CI (TeamCity) will analyze the tests result

Some important details:

  1. fledge SD card is mounted to pc folder
  2. tests application has autostart flag. So we don't need anything to do to start it
  3. test app communicates with ant task over file markers on pc:

    • started.test file is created when app started
    • finished.test file is crated when app runs all tests

This is not perfect solution but it works. As well you understand how long is feedback from these tests as well how all developers are against to support these test.

Fortunately we are using more better approach - we using junit tests on the desktop as much as possible. In case if code has BlackBerry API calls we used before writing own fake classes and recently we using PowerMock as much as possible. This is also sometimes really hard but it's working almost all time.

Sure these tests don't cover functional tests like SocketConnection reliability with different parameters, database migration, integration tests with server. But we found that sim usually doesn't work as real device in these areas. It is much ideal working in comparing of set of different behavior on real devices. so we run in sim only integration tests for communication with server. not many.

And by the way we dropped SQLite DB on BB and turned to persistent storage because it's completely slow and hangs all device on 5 OS old devices (and sometimes is big trouble for newer devices as well).

My warm regards to you - the BlackBerry developer who is testing app in automated way. There are not many such talents

Upvotes: 2

Related Questions