loadrunner培训文档.ppt
《loadrunner培训文档.ppt》由会员分享,可在线阅读,更多相关《loadrunner培训文档.ppt(124页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、大纲oLoad runner介绍o规划o编写脚本 脚本录制、调试、优化脚本录制、调试、优化o场景设计场景设计 用户数、场景类型、场景计划、运行设置、实时监控用户数、场景类型、场景计划、运行设置、实时监控o场景执行场景执行 调试场景、小压力运行、调试场景、小压力运行、100%负载测试、压力测试负载测试、压力测试o结果分析结果分析 常用指标观察、生成测试报告常用指标观察、生成测试报告第一节LoadRunner 介绍介绍为什么要进行压力测试oThe failure of a mission-critical application can be costlyoAssure performance a
2、nd functionality under real-world conditionsoLocate potential problems before your customers dooReduce development timeoReduce infrastructure costs压力测试分类Find out whether the system can handle the expected load upon deployment under real-world conditions. Find the applications breaking point. Apply t
3、esting that measures whether the applications environment is properly configured to handle expected or potentially unexpected high transaction volumes.Load TestingStress TestingFind the stability of the system with respect to handling large amounts of data over extended time periods. Volume TestingF
4、ind the behavior and performance of each tier. Component Testing压力测试目标举例pApplication response timeHow long does it take to complete atask?p Configuration sizingWhich configuration provides thebest performance level?p AcceptanceIs the system stable enough to gointo production?p RegressionDoes the new
5、 version of the softwareadversely affect response time?p ReliabilityHow stable is the system under aheavy work load?p Capacity planningAt what point does degradation inperformance occur?p Bottleneck identificationWhat is the cause of degradation inperformance?p Product evaluationWhat is the best ser
6、ver for 100users?TestersLoad GenerationSystem Under TestDo you have the testing resources? Testing personnel Client machinesHow do you synchronize users?How do you collect and analyze results?How do you achieve test repeatability?Everybody, click the SEARCH button again手工测试的问题CoordinatorDatabase ser
7、verApplication serverLoadRunner解决方案Overcomes resource limitations Provides meaningful results with analysis tools Allows repeatable tests with scripted actionsAnalysis Runs many Vusers on few machines Replaces testers with Virtual Users Controller manages Virtual UsersDatabase serverControllerVusers
8、Virtual User load generatorApplication serverLoad GenerationSystem Under TestLoadRunner的实现方法LoadRunner is a complete solution to conduct automated load testing before, during, and after application deployment.LoadRunner allows you to.ScaleIdentifyDiagnosethe application to a predetermined capacity.b
9、usiness processes or system components having trouble.a problem to pinpoint the root cause.LRVUGENVuser Script Recorder records Vuser scripts that simulate the steps of real users using the application.LR CONTROLLERThe Controller is an administrative center for creating, maintaining and executing Sc
10、enarios. The Controller assigns Vusers and load generators to Scenarios, starts and stops load tests and performs other administrative tasks.LRANALYSIS LR Analysis provides graphs and reports. These graphs and reports summarize the system performance.LoadRunner 组件LoadRunner 支持的环境 Web:HTTP(S)CORBAWAP
11、COMRMILDAPWinsockStreamingFTPIIOPPOP3iModeRealPlayerMS MediaVoice XMLSMTPDatabases:OracleMS SQLServerDB2 SybaseInformixODBCMiddlewareProtocols:CORBACOMEJBsTUXEDOJoltJDBCMQSeriesPlatforms:NT, 2000, XPSunHPIBMLinuxERP/CRM:Oracle Apps.SAPSiebelPeopleSoftClarifyBaanLegacy:32705250VT100Internet/IntranetD
12、atabaseserverAppserversWebserversClients什么是 Scenario?scriptsrun-time settingsload generatorsreal-time monitorsvirtual usersElements of a ScenarioScenarioA scenario is a file that defines which Vusers to execute, the number of Vusers to run, the goals of the test, which computer hosts the Vusers and
13、the conditions under which to run the load test.LoadRunner的工作方式DatabaseserverAppserversWebserversLR CONTROLLER LOAD GENERATOR 2 (NY)LRANALYSIS LOAD GENERATOR 1 (SF)Create scenarios and assign them to load generators.Generates load and sends performance data to controller. Access the reports and grap
14、hs.Generates load and sends performance data to controller.Performance metrics硬件配置需求Win NTWin 2000 Win XP500 MBWin NTWin 2000 Win XP UNIXDepends on the number of Vusers and runtime settings.Win NTWin 2000 Win XP200 MB Operating SystemFree Hard Disk Space256 MB256 MB256 MBMemoryAnalysisLoad Generator
15、ControllerLR Components压力测试流程Define GoalsAnalyze systemGather System Usage DataRecord Scripts and turn scripts into Vusers by adding test data and user behavior Create Scenarios based on your goalsExecute Scenarios for testing first, running 100% and overloadingAnalyze results data and pinpoint bott
16、lenecksFine tune system based on analysis data and re-run the scenarioTweakSystem Basedon AnalysisPlan Load Test1Create Virtual Users2Scenario Creation3Scenario Execution4Results Analysis5Rerunning the scenario indicates whether performance has improved and whether goals have been achieved. 压力测试是一项团
17、队工作Manages the test application implementation for all phases of load testingProvides expertise on the businessfunctionality of the application under test for planning phaseTeam MemberMain ResponsibilityProject ManagerFunctional ExpertCreates the multi-user load on the system for all phases of load
18、testingLoadRunner ExpertAnalyzes and tunes the application server for results analysis phase Application Server Performance Basis ExpertAnalyzes and tunes the database server for results analysis phaseDatabase Performance Basis ExpertLoadRunner 团队工作TweakSystem Basedon AnalysisPlan Load Test1Create V
19、irtual Users2Scenario Creation3Scenario Execution4Results Analysis5LR ExpertFunctional ExpertProject ManagerLR ExpertFunctional ExpertProject ManagerLR ExpertLR ExpertSys AdminServer Expert(s)Sys AdminServer Expert(s)LR Expert返回大纲返回大纲第二节 规划规划在创建脚本之前要进行充分的规划Plan Load Test1Create Virtual Users2Scenari
20、o Creation3Scenario Execution4Results Analysis5Goals, business processes, user type, user behaviors, input data, system profiling,scenario design, and LoadRunner installation规划阶段的内容 建立负载测试的目标 制定出可以用数量衡量的目标标准 分析被测系统的业务运行状况确定要录制哪些商业流程(business processes)确定业务高峰的负载情况和时间把需要测试的BP的操作步骤形成正式文档准备测试数据 收集系统的技术信
21、息 确定系统的架构 确定系统各部件的软件情况,使用什么样的数据库服务器?Web服务器? 以帮助我们在合理的时间内确定系统瓶颈本次培训使用的Demo软件Start Programs Mercury ToursBefore you access thetraining application:Invoke the ApacheServer (Start Programs StartServer)返回大纲返回大纲第三节编写脚本编写脚本录制Web脚本的方法1. 运行VuGen,创建新的脚本4. 开始录制5. 进行正常的业务流程的操作6. 当业务操作完毕后,按Stop Recording将录制结束7.
22、保存脚本2. 选择创建Web(HTTP/HTML) protocol的脚本3. 设定录制选项 Recording Options.DEMO 老师将会演示如何录制脚本设定录制选项 Recording Options Recording Browser Recording Proxy Advanced CorrelationDEMO Recording Options 两种不同查看脚本的方式Tree ViewScript ViewTree view has icons for the recorded user stepsEach Tree View icon represents a C sta
23、tement viewable in Script View DEMO Tree and Script View Icon and usage examples什么时候选择不同的录制方式?This is default mode.If problem encountered with form submission or with link clicking then record with URL option checked under HTML Advanced HTML Recording:URL Recording:Records a separate request for eac
24、h object requested from the server. Gives best control over traffic.脚本的目录结构C:web_project-Scripts-Action1.cvuser_init.cvuser_end.cLab1Script2.usrAs soon as the script is saved, these are the folders that you will seeLab1Script2设置回放的运行时刻设置Run-time SettingsRun LogicPacingLogThink TimeMiscellaneousSpeed
25、 SimulationBrowser EmulationProxyPreferencesContentCheckAvailable for all protocols.Specific to Web.DEMO Run-time Settings 运行脚本Click the Run button to play back the script.The Execution log lists all messages once the script has stopped running. DEMO Running a script and how to set results directory
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- loadrunner 培训 文档
限制150内