MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

Using xnee

Xnee is a suite of programs that can record, replay and distribute user actions (X events) under the X11 environment. It can be used, for example, for test automation.

This version of xnee only provides the cnee command-line utility and the xnee library, not the gnee graphical utility.

The most significant advantage of using the xnee tool for testing is that there is less overhead than with accessibility-based testing. However, xnee also has the following disadvantages:

  • More fragile than accessibility-based testing as the tool cannot verify the test results.
  • Does not support the XInput extension events (for example, pressure).
    • Can record normal application interaction, but not all the swipe actions.


source: xnee

binary: xnee, cnee, libxnee0

Installing xnee on the Harmattan device

Prerequisite: Developer mode must be enabled.

  1. Select Settings > Security > Developer mode.
  2. Install the Test automation bundle package by clicking Install.
  3. You get a notification screen that lists all the applications to be installed in the bundle package. To install, click OK.
  4. A dependency notice appears. Click Accept.

For more information on developer mode and installable tools, see Activating developer mode.

Using the tool

To record mouse events:

  1. Connect your Harmattan device to your host workstation with SSH
  2. Enter the following command in SSH console:
    cnee --record --mouse --events-to-record 100 -o mouse_rec.xnl
  3. Perform the actions you want to test with the UI.
  4. When you are ready, press control-C on the console.
    You can also continue using the UI until 100 events are reached at which point cnee exits.

To replay the recorded actions:

  1. Enter the following command:
    cnee --replay --file mouse_rec.xnl &

Further information

For more information on the tool, see the following links: