From AragoWiki

Revision as of 22:14, 9 May 2012 by Elvitalobo (Talk | contribs)
Jump to: navigation, search

Back to Opentest's home


What's Opentest Client

It is a command line interface to the Opentest test automation framework written in Java.

How to install it

  1. Install STAF
    1. Download software from STAF
    2. Start STAF: /usr/local/staf/ (only required once. Could be added to PC init sequence)
  2. Install Opentest client
    1. wget
    2. tar xvzf opentest_cli_0.7.tar.gz
  3. Edit STAF configuration to allow communication w/ TIGT subnet. Add following lines to /usr/local/staf/bin/STAG.cfg:
trust machine local://local level 5
trust machine ssl*://158.218.*.* level 5
trust machine ssl*://10.218.*.* level 5

How to use it

Opentest client allows you to run your own tests scripts or testplans defined in Testlink

  • Running your own scripts
    • java -jar opentest_cli_0.7.jar --hw platform=<name,capabilities> --sw kernel=<local path or remote (url) to kernel image>~kernel_modules=~nfs=<nfs path or fs tarball> --user <email address> --params script=<local path to your test shell script> --template penguin. For example:
    • java -jar opentest_cli_0.7.jar --hw platform=beagleboard,linux --sw kernel=/tftpboot/build1/beagle/uImage~kernel_modules=~nfs= --user --params script=/home/a0850405local/code/local/linux/ --template penguin
  • Running Test Plans defined in Testlink
    • java -jar opentest_cli_0.7.jar --hw platform=beagleboard,linux --sw kernel=<kernel path>~kernel_modules=~nfs=<filesystem path> --user <email addr> --testplan <Testlink's project:testplan> --report MATRIX:HTML. For example:
    • java -jar opentest_cli_0.7.jar --hw platform=beagleboard,linux --sw kernel=/tftpboot/build1/beagle/uImage~kernel_modules=~nfs=/home/a0850405local/fs/beagle.tar.gz --user --testplan linux_psp2:beagleboard_psp_nightly_test --report MATRIX:HTML

How to compile it

The Opentest client is maintained under staf services

  • Create a new Eclipse project and point to the cloned sources
  • Import the following libraries needed for compilation to your Java project. You can do this by right clicking on your project name -> Build Path -> Configure Build Path. Select Libraries ->Add JARs
  1. jdom.jar [1]
  2. JSTAF.jar [available in /usr/local/staf/lib in your STAF installation ]
  3. ws-commons-util-1.0.2.jar [ Get from Testlink sources ]
  4. xmlrpc-client-3.1.jar [ Get from Testlink sources ]
  5. xmlrpc-common-3.1.jar [ Get from Testlink sources ]
  6. JRE System Library [JavaSE-1.6]

[3], [4] and [5] are available in Testlink sources

  • Import the jopts project. You can do this by right clicking on your project name -> Build Path -> Configure Build Path. Select Projects ->Add

The opentest client uses jopt to parse command line options. You need the src files since building joptsimple is a part of the opentest client compile process

  • Create your project configuration

This step is required to identify the Main class in your project. Run->Run configurations. Select a project name. Enter 'com.ti.staf.clients.Opentest' as Main class Click Apply

  • Compile the project.

Right click on your project name. Select Export. Select a location to store the output jar file to. Under Java, select "Runnable JAR file". Click Next. Under Launch Configuration, select your project's configuration. Under library handling, select "Package required libraries into generated JAR". Click Finish.

More information

  • java -jar opentest_cli_0.7.jar --help
  • java -jar opentest_cli_0.7.jar --help penguin
  • Check the README file in the Opentest Client root directory
  • Ask for help at
Personal tools