LR Loadrunner大神告诉小弟下create pushviewcontrollerr scenario 设置Vuser数量后为啥点OK 也就是确定 没反应呢

LoadRunner使用说明_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
评价文档:
10页免费5页免费7页免费6页免费88页免费 5页免费3页免费1页免费25页4下载券5页免费
喜欢此文档的还喜欢100页1下载券88页免费15页免费56页免费11页免费
LoadRunner使用说明|使​用​说​明
把文档贴到Blog、BBS或个人站等:
普通尺寸(450*500pix)
较大尺寸(630*500pix)
2014下半年教师资格证统考大备战
你可能喜欢1.&What&is&load&testing?&-&Load&testing&is&to&test&that&if&the&application&works&fine&with&the&loads&that&result&from&large&number&of&simultaneous&users,&transactions&and&to&determine&weather&it&can&handle&peak&usage&periods.&
什么是压力测试?负载测试是为了测试应用程序在大量用户同时使用时是否能正常工作,以确定它是否可以处理高峰期。
2.&What&is&Performance&testing?&-&Timing&for&both&read&and&update&transactions&should&be&gathered&to&determine&whether&system&functions&are&being&performed&in&an&acceptable&timeframe.&This&should&be&done&standalone&and&then&in&a&multi&user&environment&to&determine&the&effect&of&multiple&transactions&on&the&timing&of&a&single&transaction.&
什么是性能测试?读取和更新事务的时间加在一起,以确定是否是在可接受的时间内完成系统功能。这应该是在一个多用户环境中独立完成,然后在多用户环境中决定在单事务多用户的影响。
3.&Did&u&use&LoadRunner?&What&version?&-&Yes.&Version&7.2.&
4.&Explain&the&Load&testing&process?&&解释压力测试的过程
Step&1:&Planning&the&test.&Here,&we&develop&a&clearly&defined&test&plan&to&ensure&the&test&scenarios&we&develop&will&accomplish&load-testing&objectives.&
第一步:制定测试计划。这里,我们制定一个比较好的测试计划以保证我们开发的测试场景能够完成负载测试的目标。
Step&2:&Creating&Vusers.&Here,&we&create&Vuser&scripts&that&contain&tasks&performed&by&each&Vuser,&tasks&performed&by&Vusers&as&a&whole,&and&tasks&measured&as&transactions.&
第二步:创建虚拟用户。在这里,我们创建包含虚拟用户任务的虚拟用户脚本,任务被虚拟用户完全执行,任务被当成事务衡量。
Step&3:&Creating&the&scenario.&A&scenario&describes&the&events&that&occur&during&a&testing&session.&It&includes&a&list&of&machines,&scripts,&and&Vusers&that&run&during&the&scenario.&We&create&scenarios&using&LoadRunner&Controller.&We&can&create&manual&scenarios&as&well&as&goal-oriented&scenarios.&In&manual&scenarios,&we&define&the&number&of&Vusers,&the&load&generator&machines,&and&percentage&of&Vusers&to&be&assigned&to&each&script.&For&web&tests,&we&may&create&a&goal-oriented&scenario&where&we&define&the&goal&that&our&test&has&to&achieve.&LoadRunner&automatically&builds&a&scenario&for&us.&
第三步:创建场景。一个场景描述一个测试期间发生的事件。它包括一系列在场景中运行的机器,脚本和虚拟用户的名单。我们用LoadRunner&Controller创建场景。我可以手动创建场景也可以使用向导。在手动场景下,我们定义虚拟拥护数量,压力发生器,和被分配到每个脚本的虚拟用户数量。对于Web测试,我们已经实现使用向导创建目标明确的场景。&LoadRunner自动为我们建立一个场景。
Step&4:&Running&the&scenario.
We&emulate&load&on&the&server&by&instructing&multiple&Vusers&to&perform&tasks&simultaneously.&Before&the&testing,&we&set&the&scenario&configuration&and&scheduling.&We&can&run&the&entire&scenario,&Vuser&groups,&or&individual&Vusers.&
第四步:运行场景。我们在客户端同时加载多个虚拟用户执行任务。在测试之前,我们设置场景状态和进度,我们可以运行整个场景,虚拟用户群体,或单个虚拟用户。。
Step&5:&Monitoring&the&scenario.
We&monitor&scenario&execution&using&the&LoadRunner&online&runtime,&transaction,&system&resource,&Web&resource,&Web&server&resource,&Web&application&server&resource,&database&server&resource,&network&delay,&streaming&media&resource,&firewall&server&resource,&ERP&server&resource,&and&Java&performance&monitors.&
第五步:监控场景。我们使用LoadRunner的联机运行,交易系统资源,Web资源,Web服务器资源,Web应用服务器资源,数据库服务器资源,网络延迟,流媒体资源,防火墙服务器资源,ERP服务器资源,Java性能监视器来监控场景。
Step&6:&Analyzing&test&results.&During&scenario&execution,&LoadRunner&records&the&performance&of&the&application&under&different&loads.&We&use&LoadRunner&s&graphs&and&reports&to&analyze&the&application&s&performance.&
第六步:分析测试结果。场景执行期间,LoadRunner记录不同负载下应用程序的性能。我们使用LoadRunner的图表和报表分析应用程序的性能。
5.&When&do&you&do&load&and&performance&Testing?&-&We&perform&load&testing&once&we&are&done&with&interface&(GUI)&testing.&Modern&system&architectures&are&large&and&complex.&Whereas&single&user&testing&primarily&on&functionality&and&user&interface&of&a&system&component,&application&testing&focuses&on&performance&and&reliability&of&an&entire&system.&For&example,&a&typical&application-testing&scenario&might&depict&1000&users&logging&in&simultaneously&to&a&system.&This&gives&rise&to&issues&such&as&what&is&the&response&time&of&the&system,&does&it&crash,&will&it&go&with&different&software&applications&and&platforms,&can&it&hold&so&many&hundreds&and&thousands&of&users,&etc.&This&is&when&we&set&do&load&and&performance&testing.&
你什么时候做负载测试和性能测试?
一旦我们做界面(GUI)测试的时候就做负载测试。现代企业系统架构庞大而复杂。而单用户测试主要在功能和系统组件界面上,应用测试则侧重于整个系统的性能和可靠性。例如应用测试场景描绘了1000个用户同时登陆系统。这就会产生诸如什么是系统响应时间,它会不会崩溃,它是否与其他不同的软件应用和平台相兼容,它是否可以容纳成百上千的用户等等。这就需要我们做负载和性能测试。
6.&What&are&the&components&of&LoadRunner?&-&The&components&of&LoadRunner&are&The&Virtual&User&Generator,&Controller,&and&the&Agent&process,&LoadRunner&Analysis&and&Monitoring,&LoadRunner&Books&Online.&
LoadRunner的组件有哪些?
LoadRunner的组件包括虚拟用户生成器,控制台,代理进程,LoadRunner分析和检测,LoadRunner在线书籍。
7.&What&Component&of&LoadRunner&would&you&use&to&record&a&script?&-&The&Virtual&User&Generator&(VuGen)&component&is&used&to&record&a&script.&It&enables&you&to&develop&Vuser&scripts&for&a&variety&of&application&types&and&communication&protocols.&
你用LoadRunner的什么组件去录制一个脚本?
用虚拟用户生成器录制脚本。它是你能够开发各种应用类型和通信协议的虚拟用户脚本。
8.&What&Component&of&LoadRunner&would&you&use&to&play&back&the&script&in&multi&user&mode?&-&The&Controller&component&is&used&to&playback&the&script&in&multi-user&mode.&This&is&done&during&a&scenario&run&where&a&vuser&script&is&executed&by&a&number&of&vusers&in&a&group.&
你用LoadRunner的什么组件在多用户模式下回放脚本?
控制台组件被用来回放多用户模式下的脚本。这是通过在一个场景中执行以组为单位的一定数量的虚拟用户来回放虚拟用户脚本。
9.&What&is&a&rendezvous&point?&-&You&insert&rendezvous&points&into&Vuser&scripts&to&emulate&heavy&user&load&on&the&server.&Rendezvous&points&instruct&Vusers&to&wait&during&test&execution&for&multiple&Vusers&to&arrive&at&a&certain&point,&in&order&that&they&may&simultaneously&perform&a&task.&For&example,&to&emulate&peak&load&on&the&bank&server,&you&can&insert&a&rendezvous&point&instructing&100&Vusers&to&deposit&cash&into&their&accounts&at&the&same&time.&
集合点是什么意思?
虚拟用户脚本插入集合点来模拟大量的用户加载到服务器上。为了使多用户能同时执行任务,集合点指示虚拟用户在测试执行过程中等待多用户到达某一点再同时执行任务。例如,模拟银行服务器上的高峰负荷,你可以插入一个集合点,指示100个虚拟用户同时执行向他们的账户存钱。
10.&What&is&a&scenario?&-&A&scenario&defines&the&events&that&occur&during&each&testing&session.&For&example,&a&scenario&defines&and&controls&the&number&of&users&to&emulate,&the&actions&to&be&performed,&and&the&machines&on&which&the&virtual&users&run&their&emulations.&
什么是场景?
一个场景定义了每个测试期间发生的事件。例如,一个场景定义和控制执行的用户数量,要执行的动作,和虚拟用户将要执行任务的机器。
11.&Explain&the&recording&mode&for&web&Vuser&script?&-&We&use&VuGen&to&develop&a&Vuser&script&by&recording&a&user&performing&typical&business&processes&on&a&client&application.&VuGen&creates&the&script&by&recording&the&activity&between&the&client&and&the&server.&For&example,&in&web&based&applications,&VuGen&monitors&the&client&end&of&the&database&and&traces&all&the&requests&sent&to,&and&received&from,&the&database&server.&We&use&VuGen&to:&Monitor&the&communication&between&the&application&and&the&&Generate&the&required&function&&and&Insert&the&generated&function&calls&into&a&Vuser&script.&
解释web虚拟用户脚本的录制模式。
我们用虚拟用户生成器,通过记录一个用户执行客户端应用程序的典型业务流程开发一个虚拟用户脚本。VuGen通过记录客户端和服务器之间的活动创建脚本。例如,在基于web的应用程序,VuGen监视和跟踪所有数据库的客户端发送到,和从数据库服务器接收到的信息。我们利用VuGen监视应用程序和服务器之间的通信,生成所需的函数调用,并向虚拟用户脚本插入一个函数调用。
12.&Why&do&you&create&parameters?&-&Parameters&are&like&script&variables.&They&are&used&to&vary&input&to&the&server&and&to&emulate&real&users.&Different&sets&of&data&are&sent&to&the&server&each&time&the&script&is&run.&Better&simulate&the&usage&model&for&more&accurate&testing&from&the&C&one&script&can&emulate&many&different&users&on&the&system.&
你为什么要创建参数?
参数就像脚本的变量。他们被用来模拟真实用户改变到服务器的输入。每次脚本的运行都向服务器发送不同的数据集。为了更好的模拟用户模式得到更精确的测试,可以在控制台使用一个脚本模拟许多不同的系统用户。
13.&What&is&correlation?&Explain&the&difference&between&automatic&correlation&and&manual&correlation?&-&Correlation&is&used&to&obtain&data&which&are&unique&for&each&run&of&the&script&and&which&are&generated&by&nested&queries.&Correlation&provides&the&value&to&avoid&errors&arising&out&of&duplicate&values&and&also&optimizing&the&code&(to&avoid&nested&queries).&Automatic&correlation&is&where&we&set&some&rules&for&correlation.&It&can&be&application&server&specific.&Here&values&are&replaced&by&data&which&are&created&by&these&rules.&In&manual&correlation,&the&value&we&want&to&correlate&is&scanned&and&create&correlation&is&used&to&correlate.&
什么是关联?解释自动关联和手动关联之间的差别。
关联是用来获取每一次脚本运行的唯一数据和随之生成的嵌套查询。关联提供的值避免了双重值的错误同时也优化了代码(避免嵌套查询)。自动关联是在我们设置了关联规则的地方。它可以是特殊的应用服务器。这里的值被新建的参数值取代。手动关联中,我们想关联的值是已扫描的和被关联的。
14.&How&do&you&find&out&where&correlation&is&required?&Give&few&examples&from&your&projects?&-&Two&ways:&First&we&can&scan&for&correlations,&and&see&the&list&of&values&which&can&be&correlated.&From&this&we&can&pick&a&value&to&be&correlated.&Secondly,&we&can&record&two&scripts&and&compare&them.&We&can&look&up&the&difference&file&to&see&for&the&values&which&needed&to&be&correlated.&&In&my&project,&there&was&a&unique&id&developed&for&each&customer,&it&was&nothing&but&Insurance&Number,&it&was&generated&automatically&and&it&was&sequential&and&this&value&was&unique.&I&had&to&correlate&this&value,&in&order&to&avoid&errors&while&running&my&script.&I&did&using&scan&for&correlation.&
你如何找到哪里需要关联?从你做过的项目中举例。
两个方法:首先我们可以浏览关联,看看可能被关联的值列表。从中我们可以选取一个值做关联。第二,我们可以录制两个脚本并做比较。我们可以查找需要做关联的不同的值列。在我所做的项目里,为每一个客户开发了唯一一个序号,它仅仅是个保险的账号,它是自动生成的连续且唯一的值。我需要把这个值做关联,为了避免在运行脚本过程中出错,我确实做了关联。
15.&Where&do&you&set&automatic&correlation&options?&-&Automatic&correlation&from&web&point&of&view&can&be&set&in&recording&options&and&correlation&tab.&Here&we&can&enable&correlation&for&the&entire&script&and&choose&either&issue&online&messages&or&offline&actions,&where&we&can&define&rules&for&that&correlation.&Automatic&correlation&for&database&can&be&done&using&show&output&window&and&scan&for&correlation&and&picking&the&correlate&query&tab&and&choose&which&query&value&we&want&to&correlate.&If&we&know&the&specific&value&to&be&correlated,&we&just&do&create&correlation&for&the&value&and&specify&how&the&value&to&be&created.&
你在哪里设置自动关联选项?
在web站点的录制选项里设置自动关联和关联表格。在这里我们可以制定关联规则关联整个脚本,选择线上发布消息或者线下执行活动。数据库自动关联可以通过浏览输出窗口的关联列表找出需求关联键选择我们需要做关联的值。我们只需要为这个值建立关联并描述如何创建这个值。
16.&What&is&a&function&to&capture&dynamic&values&in&the&web&Vuser&script?&-&Web_reg_save_param&function&saves&dynamic&data&information&to&a&parameter.&
捕捉web虚拟用户脚本动态值的是什么函数?
Web_reg_save_param函数用来保存动态数据信息为一个参数。
17.&When&do&you&disable&log&in&Virtual&User&Generator,&When&do&you&choose&standard&and&extended&logs?&-&Once&we&debug&our&script&and&verify&that&it&is&functional,&we&can&enable&logging&for&errors&only.&When&we&add&a&script&to&a&scenario,&logging&is&automatically&disabled.
Standard&Log&Option:&When&you&select&Standard&log,&it&creates&a&standard&log&of&functions&and&messages&sent&during&script&execution&to&use&for&debugging.&Disable&this&option&for&large&load&testing&scenarios.&When&you&copy&a&script&to&a&scenario,&logging&is&automatically&disabled.
Extended&Log&Option:&Select&extended&log&to&create&an&extended&log,&including&warnings&and&other&messages.&Disable&this&option&for&large&load&testing&scenarios.&When&you&copy&a&script&to&a&scenario,&logging&is&automatically&disabled.&We&can&specify&which&additional&information&should&be&added&to&the&extended&log&using&the&Extended&log&options.&
你什么时候在虚拟用户生成器中禁用日志?什么时候选择标准的和扩展的日志?
当我们调式脚本和校验是功能性的,我们可以只记录出错的日志。当我们把一个脚本加入到一个场景,日志默认是禁用的。
标准日志选项:当你选择标准日志,在脚本调试执行的过程中创建并发送一个标准的日志消息。大负载场景测试中禁用此项。当你复制一个脚本到场景中,日志自动关闭。
扩展日志选项:选择扩展日志建立扩展性日志,包括警告和其他信息、当你复制脚本到场景中,日志自动关闭。我们可以通过扩展日志选项指定附加信息加到扩展日志里面。
18.&How&do&you&debug&a&LoadRunner&script?&-&VuGen&contains&two&options&to&help&debug&Vuser&scripts-the&Run&Step&by&Step&command&and&breakpoints.&The&Debug&settings&in&the&Options&dialog&box&allow&us&to&determine&the&extent&of&the&trace&to&be&performed&during&scenario&execution.&The&debug&information&is&written&to&the&Output&window.&We&can&manually&set&the&message&class&within&your&script&using&the&lr_set_debug_message&function.&This&is&useful&if&we&want&to&receive&debug&information&about&a&small&section&of&the&script&only.&
你怎样调试一个LoadRunner的脚本?
VuGen包含两个帮助调试虚拟用户脚本的选项&&运行设置命令和断点。选项对话框里面的调试设置允许我们决定追溯到场景执行的范围。调试信息被写在输出窗口。我们可以在脚本里面利用lr_set_debug_message函数手动设置信息类别。当我们只想要接收一小段脚本信息时很有用。
19.&How&do&you&write&user&defined&functions&in&LR?&Give&me&few&functions&you&wrote&in&your&previous&project?&-&Before&we&create&the&User&Defined&functions&we&need&to&create&the&external&library&(DLL)&with&the&function.&We&add&this&library&to&VuGen&bin&directory.&Once&the&library&is&added&then&we&assign&user&defined&function&as&a&parameter.&The&function&should&have&the&following&format:&__declspec&(dllexport)&char*&(char*,&char*)Examples&of&user&defined&functions&are&as&follows:GetVersion,&GetCurrentTime,&GetPltform&are&some&of&the&user&defined&functions&used&in&my&earlier&project.&
你怎样在LR里面写用户定义的函数?给我几个你在以前的项目中写过的函数。
在我们创建用户自定义函数之前我们需要用这个函数创建外部文档。我们把这个文件加到VuGen的bin目录下面。文档一旦加进去我们就把它以一个参数的方式分配给用户自定义函数。这个函数需要以下格式:_declspec(dllexport)&char*(cahr*,char*)。用户自动以函数的例子如下:GetVersion,&GetCurrentTime,&GetPltform是我在先前的项目中用过的自定义函数。
20.&What&are&the&changes&you&can&make&in&run-time&settings?&-&The&Run&Time&Settings&that&we&make&are:&a)&Run&logic&-&It&has&iteration&count.&b)&Log&-&Under&this&we&have&Disable&Logging&Standard&Log&and&Extended&c)Think&Time&-&In&think&time&we&have&two&options&like&Ignore&think&time&and&Replay&think&time.&d)&General&-&Under&general&tab&we&can&set&the&vusers&as&process&or&as&multithreading&and&whether&each&step&as&a&transaction.,
你在run-time-setting里面可以做哪些更改?
我们可以在run-time-setting里面做的是:a)执行逻辑,它包含迭代次数。b)日志,在这里我们可以选择禁用日志,标准日志和扩展日志。C)思考时间,在思考时间下面我们有两个选择,一个是忽略思考时间一个是重播思考时间。D)常规,在常规里面我们可以设置虚拟用户是以进程还是多线程的方式运行,还是每一步都作为一个事务。
21.&Where&do&you&set&Iteration&for&Vuser&testing?&-&We&set&Iterations&in&the&Run&Time&Settings&of&the&VuGen.&The&navigation&for&this&is&Run&time&settings,&Pacing&tab,&set&number&of&iterations.&
你再哪里设置测试虚拟用户的迭代次数?
我们在VuGen的Run-Time-Setting里面设置迭代。导航设置是:执行时间设置->运行逻辑->设置迭代次数。
22.&How&do&you&perform&functional&testing&under&load?&-&Functionality&under&load&can&be&tested&by&running&several&Vusers&concurrently.&By&increasing&the&amount&of&Vusers,&we&can&determine&how&much&load&the&server&can&sustain.&
你如何在负载下执行功能测试?
负载下的功能可以通过同时运行多个虚拟用户来测试。通过增加虚拟用户数量,我们可以判断服务器可以承受多少符合。
23.&What&is&Ramp&up?&How&do&you&set&this?&-&This&option&is&used&to&gradually&increase&the&amount&of&Vusers/load&on&the&server.&An&initial&value&is&set&and&a&value&to&wait&between&intervals&can&be&specified.&To&set&Ramp&Up,&go&to&&Scenario&Scheduling&Options&&
什么是递增?你怎样设置?
这个选项被用来逐渐地增加虚拟用户数量/压力给服务器。可以指定一个初始值和间隔时间。在&场景安排选项&里面设置。
24.&What&is&the&advantage&of&running&the&Vuser&as&thread?&-&VuGen&provides&the&facility&to&use&multithreading.&This&enables&more&Vusers&to&be&run&per&generator.&If&the&Vuser&is&run&as&a&process,&the&same&driver&program&is&loaded&into&memory&for&each&Vuser,&thus&taking&up&a&large&amount&of&memory.&This&limits&the&number&of&Vusers&that&can&be&run&on&a&single
generator.&If&the&Vuser&is&run&as&a&thread,&only&one&instance&of&the&driver&program&is&loaded&into&memory&for&the&given&number&of&Vusers&(say&100).&Each&thread&shares&the&memory&of&the&parent&driver&program,&thus&enabling&more&Vusers&to&be&run&per&generator.&
把虚拟用户当做线程运行的好处是什么?
VuGen提供了使用多线程的功能。这使得允许更多的虚拟用户可以在生成器上执行。如果虚拟用户以进程的方式运行,每一个虚拟用户都加载一个驱动程序到内存中,从而占用了大量的内存空间。这样就限制了在一台生成器可以运行的虚拟用户的数量。如果虚拟用户以线程的方式运行,只有一个虚拟用户数量(假设100)的实例被加载到内存中。每个线程共享父驱动程序的内存,从而使更多的虚拟用户可以在一个生成器中运行。
25.&If&you&want&to&stop&the&execution&of&your&script&on&error,&how&do&you&do&that?&-&The&lr_abort&function&aborts&the&execution&of&a&Vuser&script.&It&instructs&the&Vuser&to&stop&executing&the&Actions&section,&execute&the&vuser_end&section&and&end&the&execution.&This&function&is&useful&when&you&need&to&manually&abort&a&script&execution&as&a&result&of&a&specific&error&condition.&When&you&end&a&script&using&this&function,&the&Vuser&is&assigned&the&status&"Stopped".&For&this&to&take&effect,&we&have&to&first&uncheck&the&&Continue&on&error&&option&in&Run-Time&Settings.&
当脚本运行发生错误的时候你怎样停止执行?
Lr的终止功能可以使虚拟用户脚本终止执行。它指示虚拟用户停止执行操作的部分,执行结束的部分并结束执行。当你需要手动终止执行脚本作为一个特定的错误条件时是非常有用的。当你使用此功能结束一个脚本,虚拟用户被分配到&停止&状态。为了使此项生效,我们必须首先在运行时间设置里设置不选&出现错误继续执行&。
26.&What&is&the&relation&between&Response&Time&and&Throughput?&-&The&Throughput&graph&shows&the&amount&of&data&in&bytes&that&the&Vusers&received&from&the&server&in&a&second.&When&we&compare&this&with&the&transaction&response&time,&we&will&notice&that&as&throughput&decreased,&the&response&time&also&decreased.&Similarly,&the&peak&throughput&and&highest&response&time&would&occur&approximately&at&the&same&time.&
响应时间和吞吐量之间是什么关系?
吞吐量图表显示的是虚拟用户每秒从服务器端接收到的以字节为单位的数据量。当我们把它与事务响应时间比较时,我们会发现,随着吞吐量的下降,响应时间也随之下降。同样地,峰值吞吐量和最高响应时间大约会发生在同一时间。
27.&Explain&the&Configuration&of&your&systems?&-&The&configuration&of&our&systems&refers&to&that&of&the&client&machines&on&which&we&run&the&Vusers.&The&configuration&of&any&client&machine&includes&its&hardware&settings,&memory,&operating&system,&software&applications,&development&tools,&etc.&This&system&component&configuration&should&match&with&the&overall&system&configuration&that&would&include&the&network&infrastructure,&the&web&server,&the&database&server,&and&any&other&components&that&go&with&this&larger&system&so&as&to&achieve&the&load&testing&objectives.&
描述你的系统的配置情况。
我们的系统是参考运行虚拟用户的客户机器来配置的。任何一台客户机的配置都包括它的硬件配置,内存,操作系统,软件应用,开发工具等。系统组件的配置应与整个系统的诸如网络基础设施,web服务器,数据库服务器,以及其他的任何组件相匹配,从而达到负载测试的目标。
28.&How&do&you&identify&the&performance&bottlenecks?&-&Performance&Bottlenecks&can&be&detected&by&using&monitors.&These&monitors&might&be&application&server&monitors,&web&server&monitors,&database&server&monitors&and&network&monitors.&They&help&in&finding&out&the&troubled&area&in&our&scenario&which&causes&increased&response&time.&The&measurements&made&are&usually&performance&response&time,&throughput,&hits/sec,&network&delay&graphs,&etc.&
你如何识别性能瓶颈?
性能瓶颈可以用监视器检测到。这个监视器可以是应用服务器监视器,网络服务器监视器,数据库服务器监视器和网络监视器。他们帮助查找我们场景中引起响应时间增加的问题区域。经常用性能响应时间,吞吐量,点击/秒,网络延迟图形来测量。
29.&If&web&server,&database&and&Network&are&all&fine&where&could&be&the&problem?&-&The&problem&could&be&in&the&system&itself&or&in&the&application&server&or&in&the&code&written&for&the&application.&
如果web服务器,数据库和网络都运行良好,哪里还可能出问题?
问题还可能出在系统本身,或者应用服务器,或者应用程序的代码上。
30.&How&did&you&find&web&server&related&issues?&-&Using&Web&resource&monitors&we&can&find&the&performance&of&web&servers.&Using&these&monitors&we&can&analyze&throughput&on&the&web&server,&number&of&hits&per&second&that&occurred&during&scenario,&the&number&of&http&responses&per&second,&the&number&of&downloaded&pages&per&second.&
你如何找出web服务器相关的问题?
利用网络资源监视器可以查找网络服务器的性能。利用这些服务器我们可以分析网络服务器上面的吞吐量,场景中每秒点击量,每秒的http响应量,每秒页面下载量。
31.&How&did&you&find&database&related&issues?&-&By&running&&Database&&monitor&and&help&of&&Data&Resource&Graph&&we&can&find&database&related&issues.&E.g.&You&can&specify&the&resource&you&want&to&measure&on&before&running&the&controller&and&than&you&can&see&database&related&issues&
如何查找数据库方面的问题?
我们可以通过运行&数据库&监视器和借助&数据资源图表&找到数据库相关的问题。比如,在运行控制台之前你可以指定你想要测量的资源然后你可以看到数据库相关问题。
32.&Explain&all&the&web&recording&options?&
Internet&Protocol(网络协议)
--Recording(录制)
Recording&level&录制水平:HTML-based&script&基于HTML格式的脚本,URL-based&script基于URL格式的脚本。
--Browser(浏览器)
Browser&or&application&to&record要录制的浏览器或应用:use&default&browser使用默认浏览器;manually&launch&an&application手动登陆一个应用;Specify&path&to&application指定应用路径
--Recording&Proxy(录制代理)
No&proxy(direct&connection&to&the&internet)不使用代理(直接连接到网络);obtain&the&proxy&settings&from&the&recording&browser从录制浏览器获得代理设置;use&custom&proxy使用客户代理
33.&What&is&the&difference&between&Overlay&graph&and&Correlate&graph?&-&Overlay&Graph:&It&overlay&the&content&of&two&graphs&that&shares&a&common&x-axis.&Left&Y-axis&on&the&merged&graph&show&s&the&current&graph&s&value&&&Right&Y-axis&show&the&value&of&Y-axis&of&the&graph&that&was&merged.&Correlate&Graph:&Plot&the&Y-axis&of&two&graphs&against&each&other.&The&active&graph&s&Y-axis&becomes&X-axis&of&merged&graph.&Y-axis&of&the&graph&that&was&merged&becomes&merged&graph&s&Y-axis.&
覆盖表和关联表有什么区别?
-覆盖表:共用一个x轴覆盖两个表的内容。合并图表左边y轴显示当前表的值,右边y轴显示被合并表的值。
-关联表:两个表的y轴相对而设,当前表的y轴变成了被合并表的x轴,被合并表的y轴变成了合并表的y轴。
34.&How&did&you&plan&the&Load?&What&are&the&Criteria?&-&Load&test&is&planned&to&decide&the&number&of&users,&what&kind&of&machines&we&are&going&to&use&and&from&where&they&are&run.&It&is&based&on&2&important&documents,&Task&Distribution&Diagram&and&Transaction&profile.&Task&Distribution&Diagram&gives&us&the&information&on&number&of&users&for&a&particular&transaction&and&the&time&of&the&load.&The&peak&usage&and&off-usage&are&decided&from&this&Diagram.&Transaction&profile&gives&us&the&information&about&the&transactions&name&and&their&priority&levels&with&regard&to&the&scenario&we&are&deciding.&
你如何计划负载?标准是什么?
负载测试计划将决定用户数量,我们将用何种机器和在哪里运行它们。它基于两个重要的文件:任务分配表和事务文件。任务分配表给了我们特定事务的用户数量和加载时间等信息。峰值用法和零用法也从中获得。事务文件给了我们指向场景的事务名称和它们的优先级信息。
35.&What&does&vuser_init&action&contain?&-&Vuser_init&action&contains&procedures&to&login&to&a&server.&
Vuser_init行为包含哪些内容?
Vuser_init包含登陆服务器的程序。
36.&What&does&vuser_end&action&contain?&-&Vuser_end&section&contains&log&off&procedures.&&&
Vuser_end行为包含哪些内容?
Vuser_end里面包含退出的过程。
37.&What&is&think&time?&How&do&you&change&the&threshold?&-&&&Think&time&is&the&time&that&a&real&user&waits&between&actions.&Example:&When&a&user&receives&data&from&a&server,&the&user&may&wait&several&seconds&to&review&the&data&before&responding.&This&delay&is&known&as&the&think&time.&Changing&the&Threshold:&Threshold&level&is&the&level&below&which&the&recorded&think&time&will&be&ignored.&The&default&value&is&five&(5)&seconds.&We&can&change&the&think&time&threshold&in&the&Recording&options&of&the&Vugen.&
什么是思考时间?你如何改变它的临界值?
思考时间是一个真实用户等待和行动之间的时间。例如:当一个用户从服务器接收数据,在作出响应前用户可能需要等待几秒去接收。这种延迟就被当做是思考时间。更改临界值:临界值低于该记录的思考时间水平将会被忽略。默认值是5秒。我们可以在VuGen的录制选项里更改值域。
38.&What&is&the&difference&between&standard&log&and&extended&log?&-&The&standard&log&sends&a&subset&of&functions&and&messages&sent&during&script&execution&to&a&log.&The&subset&depends&on&the&Vuser&type。Extended&log&sends&a&detailed&script&execution&messages&to&the&output&log.&This&is&mainly&used&during&debugging&when&we&want&information&about:&Parameter&substitution.&Data&returned&by&the&server.&Advanced&trace.&
标准日志和扩展日志之间有何区别?
标准日志发送在脚本执行出为日志的过程中的函数和信息的子集。这个子集取决于虚拟用户类型。扩展日志发送一个详细的脚本执行信息到输出日志。这主要应用于当我们想要一个关于参数替代的调试期。从服务器端返回的数据的高级进程
39.&Explain&the&following&functions:&-&lr_debug_message&-&The&lr_debug_message&function&sends&a&debug&message&to&the&output&log&when&the&specified&message&class&is&set.&lr_output_message&-&The&lr_output_message&function&sends&notifications&to&the&Controller&Output&window&and&the&Vuser&log&file.&lr_error_message&-&The&lr_error_message&function&sends&an&error&message&to&the&LoadRunner&Output&window.&lrd_stmt&-&The&lrd_stmt&function&associates&a&character&string&(usually&a&SQL&statement)&with&a&cursor.&This&function&sets&a&SQL&statement&to&be&processed.&lrd_fetch&-&The&lrd_fetch&function&fetches&the&next&row&from&the&result&set.&
解释下面的函数:
lr_debug_message:当指定的信息类别被设置时发送调试信息到输出日志。
lr_output_message:发送通知信息到控制台输出窗口和虚拟用户日志文件里。
lr_error_message:发送一个出错信息到LR的输出窗口。
lrd_stmt:用一个游标连接一个字符串(通常是个sql语句),这个函数设置一个sql语句被执行。
lrd_fetch:取得结果集的下一行信息。
40.&Throughput&-&If&the&throughput&scales&upward&as&time&progresses&and&the&number&of&Vusers&increase,&this&indicates&that&the&bandwidth&is&sufficient.&If&the&graph&were&to&remain&relatively&flat&as&the&number&of&Vusers&increased,&it&would&be&reasonable&to&conclude&that&the&bandwidth&is&constraining&the&volume&of&data&delivered.&&
吞吐量:如果吞吐量的范围随着时间的推移和虚拟用户数量的增加而上升,这表明带宽是足够的。如果图表随着虚拟用户数量的增加保持一个相对平坦的趋势,那么有理由认为带宽约束大容量的数据交付。
41.&Types&of&Goals&in&Goal-Oriented&Scenario&-&&Load&Runner&provides&you&with&five&different&types&of&goals&in&a&goal&oriented&scenario:&
o&The&number&of&concurrent&Vusers&
o&The&number&of&hits&per&second&
o&The&number&of&transactions&per&second&
o&The&number&of&pages&per&minute&
o&The&transaction&response&time&that&you&want&your&scenario&
目标导向型场景中的目标
LR在目标导向型场景中为你提供了5中目标类型:*&并发的虚拟用户数量;*&每秒点击量;*&每秒事务量;&*&每分钟页面量;*&你想要场景的事务响应时间。
42.&Analysis&Scenario&(Bottlenecks):&In&Running&Vuser&graph&correlated&with&the&response&time&graph&you&can&see&that&as&the&number&of&Vusers&increases,&the&average&response&time&of&the&check&itinerary&transaction&very&gradually&increases.&In&other&words,&the&average&response&time&steadily&increases&as&the&load&increases.&At&56&Vusers,&there&is&a&sudden,&sharp&increase&in&the&average&response&time.&We&say&that&the&test&broke&the&server.&That&is&the&mean&time&before&failure&(MTBF).&The&response&time&clearly&began&to&degrade&when&there&were&more&than&56&Vusers&running&simultaneously.&
场景分析(瓶颈):
在运行关联虚拟用户图表和响应时间图表时你可以看到,随着虚拟用户数量的增加,查看路线事务的平均响应时间明显逐步增加。换言之,平均响应时间随着压力的增加稳定增加。在56个虚拟用户的时候,平均响应时间有一个突然地,急剧的上升。我们认为测试打破了服务器。这意味着失败前的时间(MTBF)。当同时有超过56个虚拟用户运行的时候,响应时间明显开始下降。
43.&What&is&correlation?&Explain&the&difference&between&automatic&correlation&and&manual&correlation?&-&Correlation&is&used&to&obtain&data&which&are&unique&for&each&run&of&the&script&and&which&are&generated&by&nested&queries.&Correlation&provides&the&value&to&avoid&errors&arising&out&of&duplicate&values&and&also&optimizing&the&code&(to&avoid&nested&queries).&Automatic&correlation&is&where&we&set&some&rules&for&correlation.&It&can&be&application&server&specific.&Here&values&are&replaced&by&data&which&are&created&by&these&rules.&In&manual&correlation,&the&value&we&want&to&correlate&is&scanned&and&create&correlation&is&used&to&correlate.&
什么是关联?解释自动关联和手动关联的区别?
关联是用来获取每一次脚本运行的唯一数据和随之生成的嵌套查询。关联提供的值避免了双重值的错误同时也优化了代码(避免嵌套查询)。自动关联是在我们设置了关联规则的地方。它可以是特殊的应用服务器。这里的值被新建的参数值取代。手动关联中,我们想关联的值是已扫描的和被关联的。
44.&Where&do&you&set&automatic&correlation&options?&-&Automatic&correlation&from&web&point&of&view,&can&be&set&in&recording&options&and&correlation&tab.&Here&we&can&enable&correlation&for&the&entire&script&and&choose&either&issue&online&messages&or&offline&actions,&where&we&can&define&rules&for&that&correlation.&&Automatic&correlation&for&database&can&be&done&using&show&output&window&and&scan&for&correlation&and&picking&the&correlate&query&tab&and&choose&which&query&value&we&want&to&correlate.&If&we&know&the&specific&value&to&be&correlated,&we&just&do&create&correlation&for&the&value&and&specify&how&the&value&to&be&created.&
你在哪里设置自动关联选项?
在web站点的录制选项里设置自动关联和关联表格。在这里我们可以制定关联规则关联整个脚本,选择线上发布消息或者线下执行活动。数据库自动关联可以通过浏览输出窗口的关联列表找出需求关联键选择我们需要做关联的值。我们只需要为这个值建立关联并描述如何创建这个值。
45.&What&is&a&function&to&capture&dynamic&values&in&the&web&vuser&script?&-&Web_reg_save_param&function&saves&dynamic&data&information&to&a&parameter.&
什么函数用来捕捉web虚拟用户脚本中的动态值?
Web_reg_save_param函数保存动态数据信息为一个参数。
您尚未登录,请后再提交你的评论!没有账号?
一览权威认证行家
TA的所有文章(14)
深圳市一览网络股份有限公司 版权所有 & 粤ICP备号 增值电信业务经营许可证:粤B2-

我要回帖

更多关于 pushviewcontroller 的文章

 

随机推荐