yewjoqI?
理ride即Heb;耳”丄”
S:
artReccud
WelcometotheVirtualUserGenerator
InaperformancelettingorapplicationmanagementemironmsntHPtppicaiionanpltcehjtriariuserswrkingonpiysicalrna:
hinejwith"flrtuarusers,orVuser^.
ThaVirtualUnrGcriBrstorQ/uGsn)worksonaiscord-and-pbybackprincipleAsyouwalk(hroi^habusinessprocessonyoursppheation,VliGenr«cordsfouracLiortsandcremes
&scriptswhichvHWformthefouncationfor^ourbueiiBaBtechnologyoplimizstiDn.
cript
“rptrpiriMnl
IfWeb(hTTF/HTML'i
WhafsN<
Protocols
9AjaxTruuincluding/merastiwel-
•Silverlighi
Transportleconfiguring
•Javaovertpioducesother」備:
hired」ctior
Features
DataForm
1TTFVHIhstructured.
Corrphtio
2.2.2选择协议
VirtualU^er
r_G
NewSingleProtocolScript
MewSingleProtocJScript
NewMultiple
ProtocolScript
ana(lesi
sor
icati
ndat
NewScript
Recerrt
Protocols
匚衣亡gory.
Web(HTTP/HThJlLj
EmulationofconinnunicationbelweenabrokerandWebreiver.
2.2.3打开网页开始录制
等待打开网页
L^auinchingapplicationforrecordimg...
2・2・4录制脚本
t丈Q占邯斤:
啻白衽活折那m炳恥可氏至联阿艾着了皓
■h.1閒fcl卞JiIffA
2・2・5完成录制
IAc
同动壶
联网害星
聡网大数据
rr卜*1
227疏3——胃®讦
2・2・8运行日志
FieEdi
过ewir^ertYweiActcrusTjzdswrdowH^ip
*|iU2i.r匚Ijj|-
ia丁孑血
^Tf«|圍j
丽t
J——
Star:
P;g&
'Running-norwnw丄-Web[Hl[P/HIMLJ|
€Action
"f«/usep_and住-qlcbn邑h
«D()
^c*ifluQ
vet-jrl(inJcz.
-
reburl(indeE・htn.1\
^UT.Lihctpj/
rURL-h1tp^//l$i2.IBB.1.11:
8S/
^Reccurce-C
'灵皀cource_u,
"RecCflntent
*a7LtTvuc-tesl/hliil\
僦fsxei才
■■花fereru]
^Snacsh&^t
"Snap5h«t=-tl,inf",
zHc4e^HTm/f
IXTKAKL^
LZlhA^Ej
cirpl
-iUrl-/irwlcts/dcfamit/'ln-age
vUrl.=/tsjr.pL
rUrl=/tenplets/default/1nage
^Url-ZtciLpL
JUrl■/1cnplcts/defmlt7in^c.
TUrl=yrenpl
rUrl=/r^nplets/defaul驴
"UrL-/ten.pL
"Jrl_/tenpIstr/iefault/iTinge
'U:
rl=卄nirpl
JTJr]=/1mpl匕七£/default/ln^ge-
'Url=?
tE!
n:
pl-
‘Uh1=/tenpIbts/defaultJ1nage
*Url=/tcnpL
'lJrl=/l!
cupault/'inage
LAST).
LAST).
迥七口旳Lwj_住HeozfcmgLog
GsreratciriLog
RumiitsData
EndingactionAction,EndingilELdli^n1.
BndlnjVuser,.,
actionipbetend.
Endingactionvnser_erj±
Vlisetleriiinate±
2・2・9保存脚本
2.3运行脚本
LaadRunnerLaunczher
LeadTesJingpreventscostlyandpainfulperformancepro!
bydetectingborttlenecksbeforeasyslernorupgradeisd@|
2.3.1设置场景
2.3.1.1设置点击率目标的场景2・3・1・1・1选择场景及脚本
2・3・1・1・2配置loadgenerator
场景设置界面点击Generators进入设置;
rariinGnal
点击“Add”;
输入发生器的IP(本机填写localhost)
点击“connect”,连接发生器;
可以看到状态变为Ready,表示发生器连接成功。
2・3・1・1・3选择场景目标
2.3.1.2设置vuser的场景
2・3・1・2・1选择场景及脚本
2・3・1・2・2设置vuser
1)双击图中蓝色startvusers部分,弹出action设置框;
2)如图中所示,一共产生10个vuser,每15秒产生2个vuser;
3)可以从vuser产生图中查看产生时序;
4)
2.3.2开始压力测试
2.3.2.1添加监控服务器
在windowsresourses监控界面右键,点击"AddMeasurements”
AddMe^snreinentE...
Exp»rtto1H1'IL..
Fretze
~GUjtidoViewsCkange5■CViarcChukger
:
Lenario
00:
00:
20
vSec)
SOsec
00:
00:
25
2・3・2・2添加主机
2・3・2・3添加监控主机IP
IVCE135L
2・3・2・4添加监控资源
Add
2・3・2・5添加监控cpu空闲率
□bject:
Processor
Class
Duurilw^
畫口Tima
%C2Tima
StC3Tima^■['PCTime
器IdleTine
SInlpcrnphTims
7iPrivilegedTime
%ProcessorTirr>e
HUserTinre
Inwtanc%:
O1234567J1
Help
E:
>
2・3・2・6添加监控内存使用率
2・3・2・7添加监控服务器完成
MonitQiedServierMachines
ResouiceMeasuiementsonlocalhosl
H&sourcaMeasurementOescriplion
定CorrirmttedEptesInUseMemoryWComnnihecIByte?
与Memmj^.\CaninnitLimit之间的比值»(Comrnittediremary扌皈果斋要写,''価盘时已在贡茴立f牛中俣留"空间的处于便用中的物理內荐-CommitLimit是由页百文件的夭屮両决定盟・釦果扩犬了页面文件.违比例就会减小L这个i十数器只显示当前百分比
:
它不是一个平均值口
IM
DKCancelAdvancedHelo
2・3・3监控压力测试过程
重点观察:
1、是否有错误;
2、响应时间是否正常;
3、服务器性能是否正常;
注:
性能监控的其他方法:
1)对于windows的服务器可以使用windows自带的性能监控工具。
2)对于linux的服务器,可以使用sar等工具。
Sar-u3200>cpu.txt
Sar-r3200>men.txt
3)对于虚拟机,可以使用vmware自带的性能监控工具。
CPU^IM^AKhlHz)
4000
3Eiin-
;/)
3.000
□J5W
g2.000
16(X0
J
1
rl
/:
*
J•
f—i
1■
_j'l
1aQM
驰
0
k
J
cd
13-^11l-^Sr-nI予丟1113^111&3-11
W2T5卜巾彳7呂b13-D5
内桿win
Tioof-ri:
25-vijsor乜盟…naos卜•m;ao
■蔚問■CAv■.ihJUiffKlJh■JbJUWK■已乂眞
2.4查看性能测试结果
Eile-evSeeB^,d^uiutcrEDiacnosIl>2SToolsE^lp
|cdoi
SealsM申於urmynri
Mwhip#
M=-
菸Irl卜TimiPncESMir^Tnl^)
Inr^lhost
99J73
2.4.1测试概况
Stub
Ehhel^V'z.eur£
Xit=p«TSbCOfid.
:
harD=ghfirt
Ithhi!
匕on2-Ttrnary
Trstr-ia---t#ipan=aTliti*
Stanrtiresumnnarv
Youcan:
dehne-SLAdatausingthe生L=unhniJ「hhDri芒士nd
Toueananalehan^artiic)nbbha>>ii口厂uingthen厂占1甲丁包~t•占“£吕「打(]_gm
Tfinsaction&」「「即巧
TianjiiictiDinsIT-sfealPasstdi2j7C-0TirfalF-aikd:
QTrfa^toop^dD4”也口onjclin垃
呼jm什iNptw乐l真$柜炒百MmimiiE,/l牯口,科。
纠巳种irmirn,ttLE?
»vijiga。
■卩P・m=卜灯
0.Q3701113.2€-601即乩血加州QQ
曾“;时自「~lTi茁坊F门"會Qoa.Q^S0DMQ0
■jLficair|门曹T■胡口C0D口口1口D4U,Q01,QHOQ
2.4.2响应时间图表
L:
scni
T1
■ft3嚅
at*z|彊F*■
i
Scat?
匕
“血曲*
ErflphBs.Mriil*J
◎茸》赳M®■工
.旳口诃Us?
F
Lilthi.id-
1
Artcn-rr^rcDC'cn
CLOB4
illH
0115
0ffi2
挖*芳dTi祁alWi
D
>]
0
a
fl
1
rtlEriniritriiKt«n
0
Q
Q
0
u
■M
r»m«T
丄:
2.5编写测试报告
2.5.1测试报告模板:
公司网站测试报告.
doc