分享学习经验---关于SilkTest从Windows移植到Unix平台的解决方案~~
看到8期小学妹总结出来的笔记,作为学长不拿出点东西也太不像话了。这是我在公司移植silktest脚本到Unix平台上收集和总结出来的经验,如果做的步骤正确的话,应该是能移植成功的~~
现在拿出来大家分享一下,英文版的,我就不再翻译过来了(好不容易写的)~~
Configure SilkTest to test applications on UNIX platform
Testing applications on UNIX platform using SilkTest requires SilkTest(Windows) and SilkBean(UNIX) to be configured properly. This document describes how to configure SilkTest (Windows) and SilkBean(UNIX).
SETTING UP THE SILKTEST ON WINDOWS SYSTEM:
Installation:
Install SilkMeter. SilkMeter is the licensing product for Segue SilkTest
Install SilkTest.
SilkTest Agent: It is a part of standard SilkTest install, so it does not require separate installation.
Configure project javaex.ini
Edit the file “C:\Program Files\Segue\SilkTest\Projects\your_project\extend\javaex.ini”.
In the section, set
Target=<the hostname of the UNIX system>
Save the javaex.ini file
Set the Agent option
Start SilkTest and open your SilkTest Project
From SilkTest Gui, select Options AgentOther,
check the box “Enable communication with SilkBean”, OK.
Set compiler option
From SilkTest Gui, select Options RuntimeCompiler constants,
Set “UNIX” value to “TRUE”.
OK, OK
This is to execute specific code branch that is targeted for specific platform such as:
if (UNIX)
Statement…
Else
Statement…
To test connectivity with UNIX system, create a testcase (appstate none) with the following lines:
Testcase tryBean() appstate none
Agent.SetOption (OPT_USE_SILKBEAN, FALSE)
Sleep (1)
Agent.SetOption (OPT_SET_TARGET_MACHINE, “your ip address:2966”)
//here “your ip address” is the ip address or hostname of the UNIX system
//by default silkbean use 2966, you may change the port if that is already used
//by other application
Sleep (1)
Agent.SetOption (OPT_USE_SILKBEAN, TRUE)
Sleep (1)
OpenviewConsole.SetActive()// here “OpenviewConsole” is the name of mainwindow of our application (AUT)
SETTING UP SILKBEAN ON UNIX:
SilkBean of SilkTest 7.5 consists of two files:
jar file SilkTest_Java3.jar ( for SilkTest 7.5)
access3bean.prop(for SilkTest 7.5)
SilkBean of SilkTest 6.5.1 consists of tree files:
jar file SilkTest_Java2.jar ( for SilkTest 6.5.1)
accessbean.prop (for SilkTest 6.5.1)
Copy SilkBean files from SilkTest Windows system to UNIX system:
For SilkTest 7.5
Copy SilkTest_Java3.jar from C:\program files\Segue\SilkTest\JavaEx to /opt/OV/nonOV/jre/1.4/lib/ext dir of UNIX system.
Copy access3bean.prop file from C:\program files\Segue\SilkTest\ to /opt/OV/nonOV/jre/1.4/lib
Rename /opt/OV/nonOV/jre/1.4/lib/access3bean.prop to /opt/OV/nonOV/jre/1.4/lib/accessibility.properties
Also you might need to use “dos2ux” command to remove some carriage return characters from /opt/OV/nonOV/jre/1.4/lib/accessibility.properties file
For SilkTest 6.5.1
Copy silkbean.jar and SilkTest_Java2.jar from C:\program files\Segue\SilkTest\JavaEx to /opt/OV/nonOV/jre/1.4/lib/ext dir of Unix system
Copy accessbean.prop file from C:\program files\Segue\SilkTest\ to /opt/OV/nonOV/jre/1.4/lib/
Rename /opt/OV/nonOV/jre/1.4/lib/accessbean.prop to /opt/OV/nonOV/jre/1.4/lib/accessibility.properties
Also you might need to use “dos2ux” command to remove some carriage return characters from /opt/OV/nonOV/jre/1.4/lib/accessibility.properties file
Export CLASSPATH
For SilkTest 7.5
Export CLASSPATH=/opt/OV/nonOV/jre/1.4/lib/ext/SilkTest_Java3.jar:$CLASSPATH
For SilkTest 6.5.1
Export CLASSPATH=/opt/OV/nonOV/jre/1.4/lib/ext/SilkTest_Java2.jar:/opt/OV/nonOV/jre/1.4/lib/ext/silkbean.jar:$CLASSPATH
Start SilkBean:
Run this command:
/opt/OV/nonOV/jre/1.4/bin/java segue.server.SilkBean
You should see: “Waiting for a connection – 2966”
Start ovconsole on Unix system:
/opt/OV/bin/ovconsole
You will see “App registered – HP OpenView Console” in SilkBean terminal
Test connection from SilkTest(Windows) to SilkBean running on UNIX
Run tryBean () test case from Windows side
If it passes, then connection is ok.
Note: First run of tryBean() fails most of the time
So try twice to make the connection ok.
START test
Now run tests from silk plan written for UNIX. 各位版主老大,要是有什么不对的地方,还希望多多指教阿~~
我在Unix平台下,application enable extension的问题还没有解决,哪位能给指点一下迷津???? 全英文的我水平达不到阿
页:
[1]