51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2625|回复: 0
打印 上一主题 下一主题

关于SilkTest从Windows移植到Unix平台的解决方案~~

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2006-3-28 15:36:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
由于是在公司内收集和总结出来的,所以就不在翻译过来了~~


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 [Communications] 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 AgentOther,
check the box “Enable communication with SilkBean”, OK.

Set compiler option
From SilkTest Gui, select Options RuntimeCompiler 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.
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-13 18:08 , Processed in 0.081989 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表