Meego Wiki
Views

Quality/QA-tools/OTS/Routing

From MeeGo wiki
Jump to: navigation, search

Contents

Testrun Routing

OTS 0.1.2 and Newer

Starting from version 0.1.2 OTS now supports additional device properties.

Worker

The config file format has changed and is not compatible with older OTS versions!

/etc/ots/worker.conf now includes new [Device] section. Devicegroup is still the only mandatory parameter but in addition to that it's possible to define devicename and deviceid.

###########################################
# REPLACE `fix_me` WITH YOUR DEVICEGROUP
###########################################
[Device]
devicegroup = fix_me

#############################
# Optional device properties
#############################

#devicename = name of the device type
#deviceid = Specific HW id of the device

Workers are now able to listen to multiple queues. Queues for the worker are generated from these 3 parameters:

  • Only devicegroup defined:
    • devicegroup
  • Devicegroup and devicename defined:
    • devicegroup
    • devicegroup.devicename
  • Devicegroup, devicename and deviceid defined:
    • devicegroup
    • devicegroup.devicename
    • devicegroup.devicename.deviceid

Deviceid is a subproperty of devicename so it is not possible to define deviceid only. An exception will be raised in that situation.

The more specific queues have higher priority than the more generic ones.

Server

On server side the routing key for a particular testrun is defined from the properties as follows:

  • Only devicegroup defined:
    • devicegroup
  • Devicegroup and devicename defined:
    • devicegroup.devicename
  • Devicegroup, devicename and deviceid:
    • devicegroup.devicename.deviceid

Defining a deviceid without devicename will raise an exception and cause the testrun to fail.

The format of the device option is:

devicegroup:<GROUP_1> devicename:<NAME> deviceid:<ID>;devicegroup:<GROUP_1> devicename:<NAME> deviceid:<ID>

This triggers two separate testruns.


For example with ots_trigger the -d option can be used as follows:

  • Route the testrun to group handset, use n900 device with deviceid 1
-d "devicegroup:handset devicename:n900 deviceid:1"
  • Route the testrun to default devicegroup, use n900 device, don't care about deviceid (Default devicegroup is defined in ots server config)
-d "devicename:n900"
  • Route the testrun to "meego_coffee" devicegroup, don't care about devicename or deviceid.
-d "devicegroup:meego_coffee"

OTS 0.1.1 and Older

Testruns are routed to workers based on devicegroup. Devicegroup is directly used as the AMQP routing key and queue name. AMQP values are directly defined in the ots.ini config file.

Personal tools