Eclipse.org Eclipse.org - Device Kit

Profile Validation Testing

Supported Profiles

A validation test has been implemented for the following profiles and profile combinations:

General Profile Validation Test Properties

The following test properties are shared by all profile validation tests:

PropertyDescriptionDefault
idThe test identifier.None.
prefixMessage topic prefix for interfacing with the profile.None.
max.response.waiting.msThe maximum time a test waits for a response to getting or changing a measurement in a profile.2000 ms
max.status.waiting.msThe maximum time a test waits for the profile status to change to the expected status in case of a state change (like for example waiting for the profile to become started at the beginning of the test).60000 ms

Running a profile validation test - an example using the GpioProfile validation test

The Device Kit includes a reference implementation of the GpioProfile that simulates a device with digital and analog I/O in a window. Example project org.eclipse.soda.dk.generic.io.simulator.test contains a launch configuration and a test script for running the GpioProfile validation test against this simulated device. Perform the following steps to run this example:

  1. Open the Eclipse workbench and run the New Example>Device Kit Samples wizard in Eclipse to create sample project org.eclipse.soda.dk.generic.io.simulator.test in the workspace.
  2. Run the generic.io.simulator.test.factory launch configuration. This will launch a target OSGi runtime with all the bundles required to create the profile and device configuration and to run the validation test.
  3. In the Package Explorer, double-click on the test script generic.io.simulator.test.factory.xml to open the Validation Test Editor.
  4. Click the 'Run Validation Test' icon in the workbench main toolbar to run the test.

Instead of using the Validation Testing view in the Eclipse workbench, it is also possible to run the validation test in the web-based user interface of the test manager by opening the Test Manager at http://localhost/testmanager in a browser and select the test script generic.io.simulator.test.factory.xml from the file system to run the test.

Creating a profile validation test script and launch configuration for a new device

To create, for example, the managed-factory service activator configuration of the GpioProfile validation test against a new device, perform the following steps:

  1. Run the New Example>Device Kit Samples wizard in Eclipse and create sample project org.eclipse.soda.dk.gpio.profile.test.agent.factory.
  2. Copy the template test script file example.gpio.profile.test.factory.xml, the template launch configuration example.gpio.profile.test.factory.launch and esc.properties to a new project.
  3. Customize the test script and launch configuration as described in the following section.

Note: when running a customized version of the standard Java launch configuration, like for example example.gpio.profile.test.launch, it is not necessary to open the test manager and specify the test script file. The correct default test script is defined in the esc.properties file in the project of the launch configuration, and the Test Manager runs on the console.

Example launch configurations and test scripts

A profile validation test itself is not device-specific; the same test agent is used for all devices. To run a profile validation test for a specific device, a device-specific launch configuration and test script must be created. The launch configuration must specify the device-specific profile implementation, device and transport bundles, and the test script must create and configure the device-specific services and test properties.

To facilitate creating a device-specific launch configuration and test script, each of the profile test agent projects contains example .launch, .xml and esc.properties files that can be copied and edited for a standard Java launch, a bundle-based launch, a factory launch or a managed launch.

The following table lists the placeholders that should be replaced in the launch configuration, the test script file and esc.properties using a text editor. Note that the substitution in the launch configuration has to be done before the launch configuration is opened in the Eclipse Run or Debug dialogs, as the launch configuration editor will remove any bundle references for bundles that are not in the workspace or target platform.

PlaceholderSubstitute with
MANUFACTURERName of the device manufacturer. Example: Intermec
PROTOCOLName of the device manufacturer. Example: Bri
manufacturer.protocolDevice manufacturer and protocol as used in package names and pids. Example: intermec.bri
manufacturerprotocolHostname or ip address to connect to the test device (if applicable). Example: intermecif5
protocolportPort number to connect to (if applicable).