|
'C:\perflosg\查看log
systemutil.Run "logman","start perf_log"
systemutil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE","http://108.88.3.123:8081/admin/index.jsp"
'Net获取屏幕高度与宽度
Set CreateInstance=DotNetFactory.CreateInstance("System.Windows.Forms.Screen","System.Windows.Forms")
width=CreateInstance.primaryscreen.workingarea.width
height=CreateInstance.primaryscreen.workingarea.height
'msgbox width & "," & height
For i =1 to 10000
x=RandomNumber(0,Width)
'去掉浏览器顶部的功能,主要测试WEB的网页部份
y=RandomNumber(100,Height)
Set APIINstance=DotNetFactory.CreateInstance("WinAPI.MouseAPI","D:\WinAPI.dll")
APIINstance.MoveMouse x,y
Reporter.ReportEvent micDone,"MouseMove","光标" & x & ", " &y
APIINstance.ClickMouse "Left",x,y,0,0
Reporter.ReportEvent micDone,"MouseClick","光标" & x & "," & y
key=array("1","2","3","4","5","6","7","8","9","0","q","w","e","r","t","y","u","i","o","p","a","s","d","f","g","h","j","k","l","z","x","c","v","b","n","m","!","@","#","$","%","^","&","*","(",")","_","+","{","}","|",":","<",">","?",",",".","/",";","'","[","]","\","=","-")
n=randomnumber(0,2)
str=key(n)
Set SendkeyInstance=DotNetFactory.CreateInstance("System.Windows.Forms.SendKeys","System.Windows.Forms")
SendkeyInstance.SendWait str
str=Now
Set regEx=new RegExp
regEx.Pattern=":"
regEx.IgnoreCase=true
str1=regEx.replace(str,"_")
str2=regEx.replace(str1,"_")
str3=str2 & "_"&RandomNumber(0,10000)
DeskTop.CaptureBitmap str3 & ".png"
Next
systemutil.Run "logman","stop perf_log"
希望大家测试产品时进行猴子测试,有效找不内存溢出问题! |
|