Skip to content

Introduction

Introduction to GNU Xnee

GNU Xnee is a suite of programs that can record, replay and distribute user actions under the X11 environment. Think of it as a robot that can imitate the job you just did. GNU Xnee is licensed under GNU GPLv3 (http://www.gnu.org/licenses/gpl.html)

Xnee can be used to

  • Automate tests – e.g nightly automatic regression tests
  • Demonstrate programs – e.g record and replay a user interaction with your system
  • Distribute actions – e.g teacher’s actions can be sent to all student’s desktops
  • Record and replay ‘macro’ – e.g Tie a key modifier combination (e.g using xkeymouse) to replay a recorded session. The macro is WM- and program independent.
  • Retype a file – e.g When testing an editor, Xnee can type in the content of a file. This can be compared with the original.

Xnee consists of a library, two applications and a Gnome panel applet

  • cnee (cnee’s not an event emulator) – Command line program
  • gnee (gnee’s not an emulator either) – Graphical User Interface (GUI) program
  • pnee (pnee’s not even emulating) – Gnome Panel Applet
  • libxnee (libxnee is basically xnee) – Library used by cnee, pnee and gnee

Features
cnee comes with all features that is offered by libxnee. The same features are offered by the GUI program gnee. There is, however, one major thing that you only can do with cnee: do unattended and automatic regression test (e.g using cron). This might seem to be a rather useless feature. It is not! The features:

  • record an Xnee session file
  • replay an Xnee session file
  • retype the content of a file
  • create/write Xnee project files
  • read Xnee project files
  • distribute device events to multiple displays

Description
All Xnee applications (gnee and cnee) receives X11 protocol data (e g XEvents) from an X server using the libxnee and prints them to a file. This file is used later on when replaying.

Events directly generated by the user (e.g KeyPress) can be replayed or faked. Requests, replies, errors and events not directly generated by the user (e.g MapNotify) can be recorded as well. By using these data Xnee applications can replay with synchronisation. This is not only useful but essential.

Background

In order to verify that a program does the job it’s supposed to do, certain tests have to be made. These tests are, IMHO, perhaps the most boring things a programmer can do. To release the programmer from this burdon Xnee is made.

Xnee started out as a command line program. During the development phase the main functionality was broken out to a library, called libxnee. The command line program changed its name to cnee. The thought behind making the library was to enable the writing of other clients than just a command line. Today there is a GUI program, gnee that uses the library.

Design a site like this with WordPress.com
Get started