Home

Load Tests Through Jmeter & Case Study

image

Contents

1. 2012 WIPROLTD WWW WIPRO COM INTERNAL Customizing the test plan cntd e Every load test should at least require parameterization Parameterization includes passing different types of data into the application to emulate the real world users performing entering different values e The above can be implemented in Jmeter with the help of CSV Data set configuration element e First we have to identify the value that needs to be parameterized e Then replace the value with a variable in the respective HTTP Request e As shown in the below snapshot Select the http request in which the value need to be parameterized Syntax to be followed for naming the variable is e Ex S variablename 2012 WIPROLTD WWW WIPRO COM INTERNAL 23 Customizing the test plan cntd File Edit Run Options Help g test pian 555 EE 555 Activation Request E 555 Request G55 Activation Request 4 Constant Timer CSV Data Set Contig AY View Results Tree A Aggregate Report Q WorkBench HTTP Request Name 555 Activation Request Comments gt Web Server Timeouts milliseconds Server Name or IP 10 105 98 23 Port Number 8001 _ poe _ Response HTTP Request Protocol default http http Method Content encoding Path jAircelTransformation2sProxyServices OrderP roxy 3 0 CreatePrepaidSubscriberService CreatePrepaidSubscriberService Redirect Automatic
2. Aircelsiloc senderName gt sloc message Hello World lt loc message gt lt iloc sendSms gt soapenv Body gt lt isoapenv Envelope gt Filename Browse doing makes it lesser accurate so prepare the test plan accordingly 2012 WIPROLTD WWW WIPRO COM INTERNAL 6 Summary Overall as an Open source tool it provides almost all the features that a commercial tool is having currently in the market This tool will be very handy for small and medium budget projects where budget allocated for the tool licensing is less Also it is easy to learn and use 2012 WIPROLTD WWW WIPRO COM INTERNAL 6 Summary Pros No Tool licensing costs Easy to use especially for the protocols like Web services FTP JDBC Testers can easily learn amp implement Using this tool we can do record amp replay the tests Correlation amp Data driven testing is possible through this tool Cons As it is an open source tool support for the tool is not available Have to rely on the Apache User manual amp Support forums Compared to commercial tools available in the market usability of the tool is difficult if you are working on complex web applications were correlations are more Customized results will not be available from this tool 2012 WIPROLTD WWW WIPRO COM INTERNAL 7 Case study This is the tool we used in performance testing of the key modules in Aircel Transfor
3. send this new valid value back to the server Correlation is where the script is modified so that some of the hard coded values in the script are no longer hard coded Rather then sending the original value to the server we may need to send different values Correlated data is data which is sent to the Client from the Server and later sent back to the Server by the Client For example the original recorded script may have included the server sending the client a session identification number something to identify the client during that particular session This Session ID was hard coded into the script during recording 2012 WIPROLTD WWW WIPRO COM INTERNAL 27 Customizing the test plan cntd During replay the server will send the client a new Session ID pm mmm QD senasms You need to capture this value E cme P PR Once Only Controller eG Request for SessionID and incorporate it into the script 7 pastes so you can send it back to the y server to correctly identify yourself for this new session If you leave the script unmodified you will send the old hard coded Session ID to the server The server will through an exception as the session id is invalid or unknown and so will not send Regular Expression Extractor Name Regular Expressio n Extractor Comments Response Field to check Body Body unescaped Headers URL Response Code Response Message Reference N
4. WIPROLTD WWW WIPRO COM INTERNAL 34 By using Jmeter we were able to simulate the above core telecom application to validate the end to end performance Though manual intervention is required to collect the data points at various tiers we have reduced the tool licensing costs by using this without compromising on the quality of the outcome Send SMS t registeaton 111 35 _ lt MSISON gt _ _ 7 SMS b renier SUS sient D datrbutpr FOS Apros einen att ows 21_ SMS alert D rewler custorrer 2012 WIPROLTD WWW WIPRO COM INTERNAL 35 8 References 1 Apache Jmeter by Emily H Halili 2 http jakarta apache org 2012 WIPROLTD WWW WIPRO COM INTERNAL 36 WIPRO Applying Thought 2012 WIPROLTD WWW WIPRO COM INTERNAL Thank You
5. Load Tests Through Jmeter amp Case Study WIPRO Applying Thought Presented By Rupesh Garg amp Vamsi Krishna Pothugunta Wipro Technologies 1 2012 WIPROLTD WWW WIPRO COM INTERNAL Agenda Introduction Define Load Testing Preparation of test plan for web application Recording user actions with Jmeter Customizing the test plan Summary SOD amp Case Study 2012 WIPROLTD WWW WIPRO COM INTERNAL Introduction e The success of open source software has been remarkable forcing even the largest commercial software vendors to acknowledge its influence e Another major factor is the current economic environment e Open source looks attractive from a cost perspective although IT departments are finding out that open source does not always mean the overall cost of a project will go down e While software licensing costs are reduced by taking up open source software which will let the total project budget go down same time the expectations around delivery time quality and support do not change 2012 WIPROLTD WWW WIPRO COM INTERNAL Introduction e Current market conditions have caused software companies to cut back on spending This has indirectly undermined one of the main arguments used by the commercial software development firms against open source quality of support e In this document we would like to discuss about the tool Imeter which is from that open source software
6. a web test plan eres Data Set Config and customization on There are still more elements available use the elements based on your requirements The more work Jmeter SOAPIXML RPC Request Name SewiceSendSMs Comments SOAP XML RPC Request URL Hatt 0 105 98 248 8001 parlayx21 sms SendSms Send SOAPAction Use KeepAlive Soap XML RPC Data WSSE SETUMY SUAPENV MUSTOTUETSTaNU T rins wsse httpsidocs oasis open orgiwss 2004 01 oasis 200401 wss wssecurity secext 1 0 xsd gt swsse UsernameToken wsu ld UsernameToken 22500973 mins wsu httpidocs oasis open orgiwss 2004 01 oasis 200401 wss wssecurity utility 1 0 xsd gt swsse Username gt appinsttsiwsse Usernare gt lt wsse Password Type httpidocs oasis open orghwss 2004 01 oasis 200401 wss username token profile 1 0 PasswordText Appinst9ts sse Password gt lt hwsse UsernameToken lt iwsse Security gt Session soap mustunderstand 0 xmIns http ischemas xmlsoap org soap enveloper mins soap httpwischamas ymisoan org soap enveloper gt Sessionld ap iSessionid gt lSession gt sxparams gt sl sparam key com bea wlcp wing plugin sms DestinationAddressType 0 value typeD gt gt l sparam key com bea wicp wing plugin sms OriginatingAddressType value type0 gt gt lt hparams gt lt soapeny Header gt lt soapenv Body gt sloc sendSms gt sloc addresses tel 92000001 34 loc addresses gt sloc senderName tel
7. ally Follow Redirects Use KeepAlive Use multipart form data for HTTP POST Send Parameters With the Request Name Value Encode include Equ senderMsisdn AVAgency_Aud_Msisdn m ltexMessage WwiT withessMsisdn uccess H UniquelD Witn Transid Transld_444 O sc S SC hal ra Send Files With the Request File Path Parameter MIME Type Browse Delete Optional Tasks C Retrieve All Embedded Resources from HTML Files _ Use as Monitor Save response as MD5 hash Embedded URLs must match 2012 WIPROLTD WWW WIPRO COM INTERNAL Customizing the test plan cntd After replacing the value with variable add CSV data set config element to the test plan Go to CSV data set config element File Edit Run Options Help D Testr sss gt B 555 Activation Request fe 555 Request 9 0 555 Activation Request f Constant Timer if Sven View Results Tree Aggregate Report Before File name please C weer provide the location of the data file where it is placed Provide the variable names which are parameterized before variable names Delimiter used in the file should be mentioned before delimiter field CSV Data Set Config Name esy Data Set Config Comments Configure the CSV Data Source Filename Path 555DummyToUseF
8. ame Regular Expression Template Match No 0 for Random Default Value GESSIONID Return app serget Regular expression to extract Dynamic value from Server the pages that have been requested 2012 WIPROLTD WWW WIPRO COM INTERNAL 28 Customizing the test plan cntd Explore the request for which server is sending dynamic responses For that request add regular expression extractor available in post processors Mention the variable name into which you want store the extracted value Give the regular expression based on the type of value that needs to be extracted in between left and right boundaries before regular expression field Field Match no represents the instance which you want to match If the desired value is not extracted then the default value will be substituted in the variable in the above Snap shot ERROR is given as the default value The variable name has to be placed in the subsequent request in place of dynamic value so that server will recognize the current session that extracted in to the variable Below figure the dynamic value is replaced with the variable name into which we have taken the dynamic response from the server 2012 WIPROLTD WWW WIPRO COM INTERNAL 29 Customizing the test plan cntd File Edit Run Options Help This concludes the Tamas P E ServiceSendsms R Once Only Controller general preparation Sommer of
9. being sent to the same server you could add a single HTTP Request Defaults element with the Server Name or IP field filled in Then when you add the 25 HTTP Request controllers Saino leave the Server Name or IP field empty The controllers will inherit this field value from the HTTP Request Defaults element 2012 WIPROLTD WWW WIPRO COM INTERNAL 3 Preparation of test plan for a web application cntd e 3 3 Listeners to View amp ge t D sess Store the Test Results ot ene a 2 g Ser ROEN 5 Comments gt Listener IS the compon ent which servcesenmms Write results to file Read from file A Feet Filename Browse LogDisplay Only Errors Successes Configure is used to see the response times te lt r eet ewe a n d th e C O n te n t p l e a S e d O a d d ce eg are Wel e ae K Nng iruldocs oasie Opsr OME 204 31 basis 2004 T wer wssecurp utiit1 0x the specific lis ten er based on ial ewsse Usernariesappinettwese Useriatna gt yo ur re q U i reme nt a d d i n g ok om moose Assen siwsee UsernemeToken needless components to the test hese plan is not recommended agens i sisogpew Bocy gt iscapent Envelope gt e Listener used to debug the test script you recorded is view results tree Where in which you can see the request and Cw Contert Langth 833 response Even it IS handy while Contert Tine teeth char
10. ber of users or threads toopcount Cirorever p Cid we want to emulate and tc the rate at which they need to hit the server which we are testing and the number of iterations the users were supposed to run 2012 WIPROLTD WWW WIPRO COM INTERNAL 3 Preparation of test plan for a web application cntd e Even we can schedule the test Please check the scheduler box so that it will list the options when to start and stop the test or you can directly give relative start and stop time Thread Group Name Thread Group Comments Action to be taken after a Sampler error Continue Stop Thread Stop Test Stop Test Now Thread Properties Number of Threads users 1 Ramp Up Period in seconds f Loop Count _ Forever 1 Scheduler Scheduler Configuration Start Time 2009 1 2 08 12 14 52 End Time 2009 1 2 08 12 14 52 Duration seconds Startup delay seconds 14 2012 WIPROLTD WWW WIPRO COM INTERNAL 3 Preparation of test plan for a web application cntd 3 2 HTTP Request SEN Defaults rE aa Name lume Request Defaults This element lets you set default tenemos oma ea values that your HTTP Request Bi Pom rarae Poti cme sense controllers use For example if l O you are creating a Test Plan with 25 HTTP Request Ee controllers and all of the requests are
11. es in order REQUIREMENT PHASE Requirement Study Project Initiation Analyzing Test Goals and Objective Determining test scope Analyzing HW requirements Test Initiation Checklist EXECUTION PHASE Performance Test Scenario Script Execution Collect the Data Analyze the Data Problem Investigation like bottlenecks memory disk processor process cache network etc resource usage like memory CPU network etc Generate the Performance analysis reports containing all performance attributes of the application Create Recommendation report based on the analysis Repeat the above test for the new build received from client after fixing the bugs and implementing the recommendations 2012 WIPRO LTD PLANNING PHASE e Test Plan Test strategies e Selection of testing tools Generating Test Scenarios Scripts e Reviewing the test documents and Base lining e Test Readiness Review ENVIRONMENTAL SETUP Set up the environment as pe the requirement Installation of OS and software and testing tools lt 5 Test readiness review COMPLETION PHASE Performance Test Report Generation Updating test documents Post implementation review Project completion checklist WWW WIPRO COM INTERNAL 3 Preparation of test plan for a web application In this document we are providing the detailed information about performance testing of a typical web application Process will be the sa
12. family Apache Jmeter is open source performance testing tool a 100 pure Java desktop application designed to load test functional behavior and measure performance e It was originally designed for testing Web Applications but later it has expanded to test other functions as well Jmeter is having almost all the basic features that a commercial tool is having 2012 WIPROLTD WWW WIPRO COM INTERNAL e Now in the current version 2 8 of Jmeter it supports testing the following applications e Advanced Web Test Plan e JDBC e FTP e JMS Point to Point e JMS Topic e LDAP e LDAP Extended e Web Services SOAP e TCP 2012 WIPROLTD WWW WIPRO COM INTERNAL Definition of Load Testing Load Tests are end to end performance tests under anticipated production load The objective of this test is to determine the response times for various time critical transactions and business processes and ensure that they are within Service Level Agreements SLAs Load tests also measures the capability of an application to function correctly under load by measuring transaction pass fail error rates There are various kind of Load tests varies depending on the pattern in which they are executed against the application 2012 WIPROLTD WWW WIPRO COM INTERNAL Definition of Load Testing cntd Here comes various phases in performance testing e Requirements phase e In this phase initial details were gathered
13. l Embedded Resources from HTML Files 18 2012 WIPROLTD WWW WIPRO COM INTERNAL Recording user actions with Jmeter cntd e Things rounded in blue line are test plan server or IP port number in HTTP request defaults component Now open internet explorer window Go to internet options gt tools gt LAN settings give server as local host or the machine on which you are doing recording port as 8080 and click ok Go to HTTP Proxy server and click on START button Now open internet explorer and give the URL in the browser and click go You can observe the request would be captured under selected target controller Tia Lat Tun Opis Pip as Tal Pat a E treed Group A D Revurding Cui lruler gt sel Gress Mewsly este iselcavedvernitale ontert uselcaceliariachlarcaucdey he he i a i 3 2 FS View Resulte Tree tes Vlur Bea wh useltra edieriaivin_ went js iselica ediarisiraauesallsp i iselraedrveriajeumiy d 3 if Ue oo type HTTP Remest L Rodrect automaticaly L Folow Receots vl Use Keene LRetrieve Al Embed ISA CA AAPLLTALYAntArT y Content type filter shen amageedegy cies i Pa eolcovciimagesayOr FT Include L Exchule f rorcarcimagoa ai i URL Patterns to include rorcarcamagcawanre yy rcorcamagezial by mer tcarcamagcotakic bg eavciimagestakle_bg_d caelmagestakle_bo_ eavenmageetake bq 4 ee a4 URL Pattui
14. mation testing assignment through which we reduced the licensing cost involved in procuring test tools The procedure which we followed involves lot of manual intervention as the application we tested is an integrated application The application for which we measured the performance is given below Tool Jmeter emulates retailer and distributor From the tool we are sending the request for registration and activation Process of registration starts by sending 111 requests Registration which retailer use to do for requesting to activate services to anew sim Logging is enabled at various levels to calculate the response times Same for activation also but here the sender will become distributor Based on the input parameters it will do the intended action 2012 WIPROLTD WWW WIPRO COM INTERNAL Case study Here instead of retailer requests were sent by Jmeter to the server excluded network elements Requests were sent by parameterising the new sim number Once the request reaches esb the transactions we used to measure are Time at which request reached Esb Time at which IVR flag was updated in CRM DB Time took to update registration request in activation DB Finally messages will be delivered to retailer distributor regarding the status of the request All the times measured above are manually through the logs from the respective servers The test conducted to measure the transaction response time at various ends 2012
15. me as explained in the previous section Various elements are available in Jmeter tool through which you can design your test plan based on the requirement It holds all the elements of the test designed These elements are listed in this document keeping HTTP HTML protocol in mind 2012 WIPROLTD WWW WIPRO COM INTERNAL 3 Preparation of test plan for a web application cntd e Test Plan File Edit Run Options Help amp let 9 TE test crouo P WD HTTP Fray Server amp GB Recording Conrokeri gt w Receding Come HE HTTP Ragel Delats Mirr Riculle Tree 35 Mortensh Test Plan Namea Test Plan Comments User Datined Variables Value Narna C Run Thread Groups consecutively e run groups one at a time H C Functional Test Mode Le save Response Data and Sampler Data i Selacting Functional Tast Mode may adversely atact pertormance nat aroctoryor jor to ciasspatn aroas oe Oar Ubrary 2012 WIPROLTD WWW WIPRO COM INTERNAL 3 Preparation of test plan for a web application cntd e 3 1 Thread Group e This is the basic component which ah accommodates all the test Mitieacw i Action to be taken after a Sampler error elem en ts In th e tes t p lan Continue Stop Thread Stop Test e In thread group provides Thread Properties P i Number of Threads users 1 op ti on to men ti on th e Ramp Up Period in seconds h num
16. or666 csy File encoding Variable Names comma delimited winess sisdn UniquelD WitnessName GubsererMsisdn Transld_444 Delimiter use t for tab Allow quoted data False Recycle on EOF Stop thread on EOF False Sharing mode All threads 2012 WIPROLTD WWW WIPRO COM INTERNAL Customizing the test plan cntd 5 2 Verification Points or TT assertions Response Assertion Name Response Assertion Main sample only Sub samples only Main sample and sub samples e Some times while doing emmen performance testing you pee oe eee need to validate how the a pamana a ppl ication Is g ivi ng the sn responses under load To vom validate the responses there are some elements provided in Jmeter those are called as Assertion elements Different types of assertion elements are available based on the type of response you are 25 validating 2012 WIPROLTD WWW WIPRO COM INTERNAL gt AE RE a ANE Ca A CHO CHO G0 oO CoO CoO O GO z oe ee se FO 26 Customizing the test plan cntd 5 3 Correlation Correlation is the capturing of dynamic values passed from the server to the client and back You save this captured value into a parameter and then use this parameter in the script in place of the original value and when it makes requests of the server
17. regarding application amp scope of testing activities Test Goals amp Objectives Test Entry amp Exit criteria Defining or taking already existing SLA s Analyzing software amp Hardware requirements 2012 WIPROLTD WWW WIPRO COM INTERNAL e Definition of Load Testing cntd Planning Phase e Preparing Test plan amp Strategies e Choosing Testing amp monitoring tools e Finalizing the critical scenarios work load design Test scripts amp design of scenarios e Test readiness review Environment Setup e Setting up test bed as per the requirements e Involves installation of tools access to environment etc 2012 WIPROLTD WWW WIPRO COM INTERNAL e Definition of Load Testing cntd Execution Phase Setting up the test data required for execution Performance test scenario execution Analyzing the test results Identification of bottlenecks Generate performance analysis report with all the performance attributes of the application This is iterative phase depends on how the application is responding If the SLAs are met then proceed to next phase Else repeat the same tests after the fix provided based on the analysis e Completion phase This phase involves creation submission amp acceptance of the final performance test report 2012 WIPROLTD WWW WIPRO COM INTERNAL e Definition of Load Testing cntd e Below image shows the pictorial representation of phas
18. ris u Exclude HTTP Proxy Server Nare HTTP Prusy Survar Cummunts sere Ladiey ye aredrin abs yeas i Purl 3080 J Allenpt HTTPS Spuufing Optiunal URL ratch stiiny pTust plar curitunt i larget Controller Thread Grp Recording Controller Y Grouping m hot grp samplers v aseFcaedvarivallwer js 5 C Capture HTTP Headers C Add Assertions C Regon marching JAL Peterat naude URL Fattas to Exel de 2012 WIPROLTD WWW WIPRO COM INTERNAL Recording user actions with Jmeter cntd e Things rounded in blue line are the captured requests under selected target controller e Now add a listener based on your requirement to see the response times and response content Listener is the component which is used to see the response times and the content add the specific listener based on your requirement 2012 WIPROLTD WWW WIPRO COM INTERNAL 5 Customizing the test plan 5 1 Parameterization or Data driven Testing e When testing any applications you may want to check how the application performs the same operations with multiple sets of data For example suppose you want to check how a Web site responds to ten separate sets of data You could record ten separate tests each with its own set of data Alternatively you can create Data Table parameters so that your test runs ten times each time using a different set of data This way of setting parameters is called parameterization
19. set utt 8 Il doing any correlation 2012 WIPROLTD WWW WIPRO COM INTERNAL 4 Recording user actions with Jmeter First to follow is add a thread group to test plan add a non test element HTTP Proxy server to work bench The purpose of HTTP Proxy server is to capture the request sent to server you are accessing Give the port number as 8080 and select the target controller in which you want to collect the requests Now move the HTTP Proxy server to your test plan Next step is to add HTTP request default to your test plan In HTTP request defaults for server name or Ip give the Ip address or domain name and give the port number in the port field Give the path in the field path Please observe in the below given snapshot 2012 WIPROLTD WWW WIPRO COM INTERNAL Recording user actions with Jmeter cntd File Edit Run Options Help gt G Test Plan Q E Thread croup HTTP Request Defaults f KA HTTP Proxy Server a Recording Controller Web Server in View Results Tree Timeouts milliseconds L E workBench Server Name or IP It 72 18 126 144 Port Number fe o Response HTTP Request Name HTTP Request Defaults Comments Protocol default http Content encoding Path selfcare Landing jsp Send Parameters With the Request Value Encode Include Equ MSISDN 9716498955 LJ C Retrieve Al

Download Pdf Manuals

image

Related Search

Related Contents

Canon EOS-1D C Instruction Manual for Macintosh  XL650V - Honda  introduzione _Salvataggio automatico_x  MQ200 User Manual    Local Playback Software User Manual  MANUAL DE INSTRUCCIONES LAVASECADORA DE  Listen Technologies LA-361 User's Manual  ヤマハ…(PDF 224KB)  2. Integrated Liquidity Management  

Copyright © All rights reserved.
Failed to retrieve file