OpenTestTee-VATF

[OpentestTEEs|Back to OpenTest's TEEs]

Overview
Test Execution Engine developed by TI. For some historical information about it see VATF Overview

Installing VATF
VATF can be run on Windows or Linux. As mentioned before, installing VATF involves two steps: 1) Installing all the Software components using a one-click installer and then registering the system w/ the Staf process running on the machine where VATF is installed.

Windows
Note: The file paths in [4] and [7] are examples. You can change them to suit your environment.

Step One - Install required software
[1] You will need to install the following software on your TEE machine [2] Install following software: [3] Clone the VATF sources. Use the following command on the Git bash git clone http://arago-project.org/git/projects/test-automation/execution-engines/vatf.git vatf This will create a vatf directory within the directory from which you invoke the command. Copy the contents of source/ directory from there to the path that you specify in the /staf/tee/test_framework_root variable in OpenTestTEE-VATF
 * Git (if you are using Git for version control)
 * Java
 * STAF
 * Ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32] (Make sure any previous version of Ruby is uninstalled before running the installer)
 * Ruby DevKit (needed to install Ruby Gems)
 * GEMS (Ruby libraries) required by VATF
 * activerecord (2.3.8)
 * activesupport (2.3.8)
 * dbi (0.4.5)
 * deprecated (2.0.1)
 * facets (2.8.4)
 * log4r (1.1.8)
 * serialport (1.0.4)
 * text-format (1.0.0)
 * text-hyphen (1.0.0)
 * Download amrita from http://sourceforge.jp/projects/amrita/downloads/10939/amrita-1.0.2.tar.gz/ Extract the tar ball and copy the "amrita" folder located at /lib/ to /lib/site_ruby/1.9.1,

Step Two - TEE adapter setup
For more information on what the TEE Adapter is go here

[4] Download the following files Create a directory called C:\VATF\xslt\. Copy the following files in to this directory
 * Upward translator
 * Downward translator
 * TEE Adapter Jar

Step Three - Configure STAF
[5] Modify C:\STAF\bin\STAF.cfg to reflect *your* settings for the following # Turn on tracing of internal errors and deprecated options trace enable tracepoints "error deprecated" # Enable TCP/IP connections interface ssl library STAFTCP option Secure=Yes option Port=6550 interface tcp library STAFTCP option Secure=No option Port=6500 # Grant access to all the computers in the framework to allow file transfers between the dispatcher and the other computers trust machine local://local level 5 trust machine ssl*://158.218.*.* level 5 trust machine ssl*://10.218.*.* level 5 #TEE adapter needed config, #Replace w/ TMC IP or name for your site set shared var staf/tmc/machine=158.218.108.109 var vatf@1/staf/tee/test_scripts_root="c:/git_repos/vatf_scripts" var vatf@1/staf/tee/test_framework_root="C:/git_repos/vatf/source" SERVICE vatf@1 LIBRARY JSTAF EXECUTE "C:/VATF/xslt/TEEAdapter.jar" parms "hwassets=["tomahawk","littleendian_0"];["linux_server",0] txtype=xslt requesttxfile=C:/VATF/xslt/downwardTranslatorVatf.xsl resulttxfile=C:/VATF/xslt/upwardTranslatorVatf.xsl resultpath=C:/VATF/vatf_automation_results.xml description=My test TEE" # Add default service loader serviceloader library STAFDSLS Note: The ["tomahawk","littleendian_0"];["linux_server",0] assets configuration is just an example, to figure out the appropriate syntax to use in your setup, please refer to. The service name vatf@1 must comply with the service registration syntax @ [6] To test, (re)start STAF. In a command window type the following command (replace with your TMC's IP address) staf 158.218.108.109 resmgr list you should see, based on the above STAF.cfg vatf@1     My test TEE

Step Four - Configure your bench file
[7] Create a file C:\VATF\bench.rb. Here is a sample of the file. Modify it to reflect your test setup linux_server = EquipmentInfo.new("linux_server", 0) linux_server.driver_class_name = "LinuxEquipmentDriver" linux_server.telnet_ip = '10.218.100.248' linux_server.telnet_port = 23 linux_server.telnet_login = 'login' linux_server.telnet_passwd = 'password' linux_server.prompt = /@/ linux_server.nfs_root_path = '/opt/min-root-c6455' linux_server.samba_root_path = "fileshare\\min-root-c6455" linux_server.tftp_path = '/tftpboot' dut = EquipmentInfo.new("tomahawk","littleendian_0") dut.driver_class_name = "LinuxC6xDriver" dut.telnet_ip = dut.telnet_port = 23 dut.login_prompt = /.*/ dut.telnet_login = 'root' dut.prompt = /#/ dut.boot_prompt = /.*/ dut.power_port = {'0' => 8 }

Step One - Install required software
1.0 You will need to install the following software on your TEE machine
 * Git (if you are using Git for version control)
 * Java
 * STAF

1.1 install ruby and rubygem sudo apt-get install ruby1.9.1-full sudo apt-get install rubygems1.9.1

1.2 install needed ruby gems. Need install the following ruby gems using the gem install command sudo gem install -v  -p. For example: For Rubygem activerecord (2.3.8), type gem install -v 2.3.8 activerecord -p http://myhttpproxy.me.com:80 Repeat the step above for following Rubygems: activesupport (2.3.8), builder (2.1.2), dbi (0.4.5), deprecated (2.0.1), facets (2.8.4), log4r (1.1.8), serialport (1.0.4)

1.3 install amrita

Download amrita from http://sourceforge.jp/projects/amrita/downloads/10939/amrita-1.0.2.tar.gz/ Extract the tar ball and copy the "amrita" folder located at /lib/ to /lib/site_ruby/1.9.1, Ex: /usr/local/lib/site_ruby/1.9.1.

1.4 install git (sudo apt-get install git-core)

1.5 clone vatf

git clone http://arago-project.org/git/projects/test-automation/execution-engines/vatf.git

1.6 change line 13 in 'metaclass.rb' under ' /var/lib/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/core_ext/object' to "deprecate :metaclass, :singleton_class". The file path may be different on your pc.

1.7 cd /source ( refers to the location where you clone vatf project on step 1.5) and issue 'ruby1.9.1 atf_run.rb -h' to check vatf runs ok. You should see the following. yan@yan-desktop:/opt/git_repos/vatf/source$ ruby1.9.1 atf_run.rb -h Usage: atf_run.rb -u -v -r  [-s ] [-d ] [-b ] [-p ] [-x ]  [-e ] [-k ] [-m ] -t <[tcaseID1,...,tcaseIDn]*n;tcaseIDx;....;tcaseID> Specific options: -u=OPTIONAL                     Tester's name or Id   -t=OPTIONAL                      Test cases to run, -t option format is one or more semicolon separated string of structure *;.... where * is optional and can be an array of caseID i.e [caseID,caseID,...] -e=OPTIONAL                     Embedded target source path -v=MANDATORY                    view drive letter, i.e x:   -s=OPTIONAL                      specifies the number of times this session will run all the tests -d=OPTIONAL                     specified the directory used to store the html results -b=OPTIONAL                     specifies the path of the bench.rb file -p=OPTIONAL IF -r IS AN RTP PATH specifies the platform type used for the tests, setting this parameter overrides the platform value specified in the matrix. Also, if this option is used the value must match a bench file entry -k=OPTIONAL IF -r IS AN RTP PATH specifies the release to be tested. For instance, it could be the kernel version or a product/component version -o                              do NOT open browser with results html at the end of the test session -m=OPTIONAL                     specifies the e-mail address(es) to send the test results summary at the end of the test execution. Separate multiple address w/ semicolons -r=MANDATORY                    a semicolon combination of paths to rtp(s), i.e. [binary_path##sourcepath::]C:\an_rtp.mdb; and a string of structure image_path::level:=areas, i.e myTargetImage::sanity:=[usb,nand,video] -a=OPTIONAL                     Specifies the information regarding any asset(s) required to run a test. The sytanx used is a semicolon separated set of = pairs -x=OPTIONAL                     specifies the number of consecutive failed or skipped tests that causes a dut reboot (if supported in test script). If this value is not specified then the system is never rebooted by the VATF -f=OPTIONAL                     specifies the path where the results will be saved when working with xml files as test data -l=OPTIONAL                     specifies the URL where that can be used to access the files specified by -d -w=OPTIONAL                     specifies the name of STAF service that is calling vatf Common options: -h, --help                      Show this message yan@yan-desktop:/opt/git_repos/vatf/source$

1.8 clone vatf-script

git clone http://arago-project.org/git/projects/test-automation/execution-engines/vatf-scripts.git

Second Step. Download TEEAdapter files
Download TEEAdapter.jar, upwardTranslatorVatf.xsl and downwardTranslatorVatf.xsl from http://arago-project.org/files/releases/opentest/0.0.19/. This is required because the TEEAdapter is the STAF service that wraps or encapsulates VATF. So TEEAdapter implements the STAF-related messaging system that allow the PC running VATF to communicate w/ the rest of the system (i.e. TMC/Dispatcher). The TEEAdapter will call the VATF executable to start running the tests. You can think of the TEEAdapter as a generic STAF service that allow pluging-in different types of execution engines by using execution-engine-specific transformations (i.e. upwardTranslatorVatf.xsl and downwardTranslatorVatf.xsl).

Third Step. Register VATF w/ STAF
Add the following entries to the STAF configuration file (i.e. Staf.cfg). Adjust paths accordingly if installing on Linux:

a) Grant access to all the computers in the framework with the following command trust machine ssl*:// level 5, i.e trust machine ssl*://192.168.*.* level 5, to allow files transfers between the dispatcher and the other computers in the framework without problems.

Please note that the subnet address may be different at your site.

b) Define staf/tmc/machine shared environment variable: set shared var staf/tmc/machine=192.168.103.71 # Replaced w/ TMC IP or name for your site

c) Register VATF with STAF and the TMC with the following commands: SERVICE vatf@1 LIBRARY JSTAF EXECUTE "/home/a0133055/staf_tee/TEEAdapter.jar" parms "txtype=xslt requesttxfile=/home/a0133055/staf_tee/downwardTranslatorVatf.xsl resulttxfile=/home/a0133055/staf_tee/upwardTranslatorVatf.xsl resultpath=/home/a0133055/vatf/vatf@1_automation_results.xml hwassets=[dm355];[dm365,sdhc_nand4k];[linux_server] description=optional description"

Note: The [dm355];[dm365,sdhc_nand4k];[linux_server] assets configuration is just an example, to figure out the appropriate syntax to use in your setup, please refer to. The service name vatf@1 must comply with the service registration syntax @