=================
 puavo-autopilot
=================

Automatic test tool for Puavo desktop sessions.

Copyright: Opinsys Oy 2015
License: GPLv2+
Author: Tuomas Räsänen <tuomasjjrasanen@tjjr.fi>

Runtime dependencies
====================

- Bash (>= 4.2)
- GNU coreutils (>= 8.13)
- GNU awk (>= 4.0.1)
- GNU grep (>= 2.12)
- GNU sed (>= 4.2.1)
- ruby (>= 1.9)
- scrot (>= 0.8)
- xautomation (>= 1.07)

This package can be used to simulate users.  It is integrated with
Puavo, Lightdm and mostly excepts Gnome-environment.  The autopilot
logs in from lightdm, and starts some programs and "uses" them.
Occasionally it will kill them and also log out.

The simulate user is adaptive to system performance: if system is more
responsive it is used more heavily, and if load gets higher user slows
down a bit.  This is to prevent users from completely trashing the system,
which would be easy, but unrealistic.

Puavo-autopilot can be used with fat clients and laptops.
Fat clients and laptops are simpler cases.  If one or more puavo-tags
are found which are of the format "autopilot:$mode:$username:$password",
for example "autopilot:stress:heikki.hepuli:kukkuu", puavo-autopilot
will login through lightdm with username "heikki.hepuli" and password
"kukkuu".  There can be several autopilot tags, in which case one gets
chosen randomly for each login.

In desktop session, if $mode is "stress" and $username matches any
autopilot-tag, puavo-autopilot activates and starts doing stuff.
If username does not match, it does nothing.  This is to allow
users to login anyway and not have their session interfered
(puavo-autopilots waits some time in lightdm that this is usually
possible).

Some other modes than "stress" are planned to be used in the future.

For example, presume we have hosts:

  test-fatclient-01
  test-laptop-01

and logins:

  test-user-01 (with password "test1")
  test-user-02 (with password "test2")
  test-user-03 (with password "test3")

We want to configure

  "test-user-01"                    to "test-fatclient-01"
  "test-user-02" and "test-user-03" to "test-laptop-01"

The following tags will do this:

  test-fatclient-01:
    autopilot:stress:test-user-01:test1

  test-laptop-01:
    autopilot:stress:test-user-02:test2 autopilot:stress:test-user-03:test3
