二.性能測試腳本自動建立測試datapool
在robot中tools->session record options, 設置Generator頁面general的use datapool選項,才能在產生datapool.
一般錄制性能測試腳本,遵循如下步驟:
第一. 設置錄制Session選項
第二. 啟動錄制對話
第三. 啟動客戶端程序
第四. 產生腳本
第五. 關閉客戶端程序
第六. 停止錄制
設置選項:
1.錄制方法(method): api, network,proxy,custom四種選項設置
通過分析要測試的軟件架構來選擇錄制的方法,下邊的表格提供參考:
Situation |
Api |
NetWork |
Proxy |
The client application access secure data from a Web server |
Required |
|
|
The Client Application access data from a web server |
Recommended |
Fist Alternate |
Second alternate |
The client application accesses objects on a DCOM Server |
Required |
|
|
The client application access an oracle8 database or oracle arrays. |
Required |
|
|
The client application access an Oracle database.(For network and proxy recording, supply the name of the oracle database,) |
Recommended |
First alternate |
Second alternate |
The client application is not installed on the local computer |
|
Recommended |
Alternate |
The client application is not running on Windows NT4, Windows XP, or Windows 2000 |
|
Recommended |
Alternate |
You want to record traffic from multiple client applications that reside on different commputers |
|
Recommended |
Alternate |
You want to record traffic between multiple,specific clent and server computers. |
|
|
Recommended |
Neither the client nor the serer computer is on same network segment as the local computer |
|
|
Required |
An Ethernet controls network traffic, and neither the client nor the server application is installed on the computer |
|
|
required |
The client application accesses a TUXEDO Server |
Recommended |
Alternate |
|
“On-the-wire” recording support is lacking |
Recommended |
|
Alternate |
Api recording is not functioning properly |
|
Recommended |
Alternate |
FDDI,ATM,or other hight-speed networks are used |
|
|
Recommended |
備注:上圖參考rational robot user’s guide,
NetWork錄制方式必須安裝Rational網絡驅動才能生效
安裝方法:
1. 開始-〉設置-〉網絡和撥號連接
2. 點本地連接
3. 點安裝,選擇協議,點添加
4. 點選者從磁盤安裝
5. 打開安裝目錄C:\Program Files\Rational\Rational Test\driverw2k(安裝rational的目錄),選者inf文件,確定
6. 選擇ethernet 或者 token ring都可以
2.Generator Filtering
Filtering
(1).設置autoFiltering使robot生成腳本時自動選擇可用協議,下邊協議選者列表可用
特別說明DCOM是一種獨占的協議,不能和其他協議共存
如果后臺是SQLSERVER,選擇SQLSERVER,如果后臺是ORACLE,選擇ORACLE協議。根據軟件實現方式,選擇不同的協議。
(2). 設置Manual Protocol Filtering使robot生成腳本時手工選擇協議
3.Generator Per Protocol
只能對在generator Filtering選擇的部分協議(http,iiop,Oracle,Tuxedo,和dcom)起作用。
文章來源于領測軟件測試網 http://www.anti-gravitydesign.com/