关于用Robot实现登陆界面的压力测试问题
本人可以用Robot实现登陆界面的大数据量测试,但是压力测试问题却存在问题:1。大数据量测试(100个用户)时,我的脚本设置为第一个模拟用户登陆成功后,接着退出系统,然后第二个用户登陆,登陆成功后,接着退出系统,如此循环100次。脚本通过了。测试结果 PASS,符合我的要求。
2。进行压力测试时候,同样是大数据量(100个用户)时,但是我的脚本设置改变为第一个模拟用户登陆成功后,没有退出系统,然后第二个用户登陆,如此循环100次。脚本没有通过。
请问我的压力测试思路是否有问题,请指教,谢谢!
详细脚本如下:
1。大数据量测试
'$Include "SQAUTIL.SBH"
Sub Main
Dim Result As Integer
dim i as integer
dim username as string
dim pwd as string
dim dp as long
'Initially Recorded: 2005-12-1917:34:27
'Script Name: 5
Window SetContext, "Class=Shell_TrayWnd", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=0", ""
StartApplication """F:\GPS 0.1test\gps\GpsClent.exe"""
dp=SQADatapoolOpen("login")
for i=1 to 100
Call SQADatapoolFetch(dp)
Call SQADatapoolValue(dp,1,username)
Call SQADatapoolValue(dp,2,pwd)
Window SetContext, "Caption=监控端", ""
Window Click, "", "Coords=30,-13"
PopupMenuSelect "登陆"
Window SetContext, "Caption=登录", ""
InputKeys username
EditBox Click, "ObjectIndex=2", "Coords=13,8"
InputKeys pwd
Window SetContext, "Class=Shell_TrayWnd", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=3", ""
Result = WindowVP (CompareNumeric, "Caption=登录", "VP=Alphanumeric;Value=0")
Window SetContext, "Caption=登录", ""
PushButton Click, "Text=确定"
Window SetContext, "Caption=监控端", ""
Window Click, "", "Coords=35,-16"
PopupMenuSelect "退出登陆"
next
Call SQADatapoolClose(dp)
Window Click, "", "Coords=29,-12"
PopupMenuSelect "退出"
Window SetContext, "Class=Shell_TrayWnd", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=3", ""
End Sub
2。压力测试脚本:
'$Include "SQAUTIL.SBH"
Sub Main
Dim Result As Integer
dim i as integer
dim username as string
dim pwd as string
dim dp as long
'Initially Recorded: 2005-12-1917:34:27
'Script Name: 5
Window SetContext, "Class=Shell_TrayWnd", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=0", ""
StartApplication """F:\GPS 0.1test\gps\GpsClent.exe"""
dp=SQADatapoolOpen("login")
for i=1 to 100
Call SQADatapoolFetch(dp)
Call SQADatapoolValue(dp,1,username)
Call SQADatapoolValue(dp,2,pwd)
Window SetContext, "Caption=监控端", ""
Window Click, "", "Coords=30,-13"
PopupMenuSelect "登陆"
Window SetContext, "Caption=登录", ""
InputKeys username
EditBox Click, "ObjectIndex=2", "Coords=13,8"
InputKeys pwd
Window SetContext, "Class=Shell_TrayWnd", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=3", ""
Result = WindowVP (CompareNumeric, "Caption=登录", "VP=Alphanumeric;Value=0")
Window SetContext, "Caption=登录", ""
PushButton Click, "Text=确定"
next ‘这里位置和上面的不一致
Call SQADatapoolClose(dp)
Window SetContext, "Caption=监控端", ""
Window Click, "", "Coords=35,-16"
PopupMenuSelect "退出登陆"
Window Click, "", "Coords=29,-12"
PopupMenuSelect "退出"
Window SetContext, "Class=Shell_TrayWnd", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=3", ""
End Sub
[ 本帖最后由 dragonhua 于 2005-12-20 18:05 编辑 ] 基本概念问题,GUI的脚本一台机只能跑一个用户,而且你这样一个接一个登陆根本达不到施压的目的 原帖由 ilovejolly 于 2005-12-20 17:16 发表
基本概念问题,GUI的脚本一台机只能跑一个用户,而且你这样一个接一个登陆根本达不到施压的目的
请问版主,怎样才能达到实压的目的呢? 录制VU脚本……不要用GUI
用TM来做并发。ROBOT本身无法实压的 看下robot的使用手册,上面都说的很清楚 楼主为何用GUI脚本来做压力测试呢?
基本概念就出了问题,作性能方面的测试应使用VU脚本. 谢谢各位,我是新手,我按各位的方法去试探一下。 谢谢各位,我是新手。我试试
页:
[1]