OpentestOtherSrvClient

From AragoWiki

Jump to: navigation, search

Back to Opentest's home

Contents

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/startSTAFProc.sh (only required once. Could be added to PC init sequence)
  2. Install Opentest client
    1. Obtain the latest version of opentest-installer_x_x.tar.gz from http://arago-project.org/files/releases/opentest/
    2. tar xvzf opentest-installer_x.x.tar.gz
    3. Run install_opentest.sh, ./install_opentest.sh
    4. Select install opentest client from the menu
  3. Edit STAF configuration to allow communication w/ TIGT subnet. Add following lines to /usr/local/staf/bin/STAG.cfg:
TRUST DEFAULT LEVEL 5
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.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.jar --hw platform=beagleboard,linux --sw kernel=/tftpboot/build1/beagle/uImage~kernel_modules=~nfs=158.218.103.64:/home/a0850405local/NFS_exports/linux/arago-test/beagleboard --user ceh@ti.com --params script=/home/a0850405local/code/local/linux/mytest2.sh --template penguin
  • Running Test Plans defined in Testlink
    • java -jar opentest_cli.jar --hw platform=beagleboard --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.jar --hw platform=beagleboard --sw kernel=/tftpboot/build1/beagle/uImage~kernel_modules=~nfs=/home/a0850405local/fs/beagle.tar.gz --user ceh@ti.com --testplan linux_psp2:beagleboard_psp_nightly_test --report MATRIX:HTML

How to build 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.jar --help
  • java -jar opentest_cli.jar --help penguin
  • Check the README file in the Opentest Client root directory
  • Ask for help at opentest@arago-project.org
Personal tools