Home

View/Open

image

Contents

1. end of run Executing test plan C temptmp testcases ntraue 1_ 649 mx Created the tree successfully Starting the test Tidying up Limeter end of run Then Test Automation Framework executes all the loaded scripts one by one and collects the results ecp castor doc Lecho Lecho Te Processing C temp results JMeterResults_2680 7 69 17142214 Jjt1 to ANA d z htm xslt Loading stylesheet C temp classes commons Jjmeter confiqurations jnete xslt Processing G temp results JMeterResults_2067 69 17_1422168 jtl to ANA d 17 _14221H html xslt Loading stylesheet C temp classes commons Jmeter confiqurations jmete Once it finished with executing all the test cases the finalized test results transformed into two separate HTML reports ecp test prepareweb Lecho Lecho Lecho copy Copying 17 files to D INSTALLATIONS Jhoss 4 8 35F1l server default dep copy Copying 2 Files to D INSTALLATIONS boss 4 8 385Fl server default de pli copy Copying 1 File to D INSTALLATIONS Jhboss 4 84 35Pl server default deplo copy Copying 1 File to D INSTALLATIONS Jhoss 4 84 35Pl server default deplo copy Copying 1 File to D INSTALLATIONS Jhoss 4 4 35Pl server default deplo Lecho JMeter test results http localhost 8680 testresults JMeterResults_Detail html http localhost 8680 testresults JMeterResults html Finally it creates a web component based on test results and deploys it into
2. _ Scheduler 63 Appendix C User Manual HTTP Cookie Manager All the other elements that need to have in the script Test Plan must be under the added Thread Group Next step is adding HTTP Cookie Manager into the Thread Group As in following figure we can add HTTP Cookie Manager into the Thread Group apache JMeter File MEdit Run Options Help Logic Controller Listener Cut Sampler Copy Assertions er a Sampler error Paste Timer Paste As Insert Config Element CSVY Data Set Config Pre Processors User Defined Variables Open Post Processors Login Config Element Merge Simple Config Element Ramp Up Period in 3 FTP Request Defaults Loop Count Ford HTTP Request Defaults HTTP Authorization Manager HTTP Cookie Manager HTTP Header Manager Java Request Defaults JDBC Connection Configuration JNDI Default Configuration LDAP Request Defaults LDAP Extended Request Defaults ALPHA TCP Sampler Config Save As Save Node As Image Ctrl Save Screen As Image Ctrl Shitt s Activate _ Scheduler Disable No changes for default settings 64 Appendix C User Manual Apache JMeter File Edit Run Options Help Invoice e E rcom HTTP Cookie Manager Hit HTTP Cookie Manager Name HTTP Cookie Manader ZS VWorkBench _ Clear cookies each iteration Cookie Policy compatibility e Cookies Stored in the Cookie Manager Name
3. Send a File With the Request I minyoice e mimo ce j_compa y marakanda invoice sername itsr_ UL minvo ce load 001 j_username marakanda iusr_ ul Minvoice load 001 71 password test Response Assertion As a practice add Response Assertions to each and every HTTP Requests Adding a Response Assertion is as follows iz TEST jmx J Current jmeter TEST jmx Apache JMeter Add gt Config Element gt Insert Parent _ Assertions gt Response Assertion BeanShell Assertion File Edit Run Options Help i Remove Delete Timer gt Cut Ctri X Listener gt Duration Assertion b gt HTML Assertion Paste Ctrl Post Processors MD5Hex Assertion Paste As Insert Port Number Size Assertion HTTP Request XML Assertion XML Schema Assertion Merge Protocol defau i Method POST Ne re XPath Assertion Post v Save Node As Image Cti G path j_security_check Save Screen As Image Ctrl Shitt s E C Redirect Automatically V Follow Redirects V Use KeepAlive Copy Ctrl C Pre Processors Open Activate Disable Send Parameters With the Request Value Encode Include Equ j_company 002 minvoice load 001 j_company username 003 minvoice load 001 username 72 Appendix C User Manual It is possible to add one or more patterns to a Response Assertion Different configurations can be used to perform checks on the response DATEST jmx J Curr
4. core Unknown database error 9 RS ZE Unexpected error occured R Asserti S inati m PAPER RER Unexpected Application Error s Logout S z Unknown business error P fogout do S KAI 73 Appendix C User Manual View Results in Table View Results in Table is using to take all time measurements of the executed test cases This element should be added to the Thread group as follows iz TESTO1 jmx J Current jmeter TESTO1 jmx Apache JMeter Run Options Help gt Logic Controller gt Listener Assertion Results BeanShell Listener Distribution Graph alpha Remove Delete I Cut Ctx Sampler Assertions Copy Ctrl C error Paste As Insert Config Element Graph Results Continue D Stop Thread O Stop Test Monitor Results Simple Data Writer Spline Visualizer Aggregate Graph Aggregate Report Pre Processors Open gt b Paste Ctri W Timer gt Graph Full Results b gt b Post Processors Merge TR Save As Save Node As Image Ctrl Save Screen As Image Ctrl Shitts Activate Disable D Response Assertion Running a test case in JMeter GUI mode will give an output of View Results in Table as shown in the following figure This listener is very useful to get the time taken for each and every request and so many other important counts iz TESTO1 jmx C Documents and Settings manjulap Desktop Current jmeter TESTO1
5. Value Domain Secure HTTP Request Defaults Add HTTP Request Defaults into the Thread Group Figure shows the exact way of adding it to the Thread Group A Apache JMeter File MEdit Run Options Help Logic Controller Listener Cut Sampler Copy Assertions Paste Timer Ta Congo Element P CSV Data Set Config Pre Processors User Defined Variables Post Processors Login Config Element er Sampler error Open Merge Simple Config Element Ramp Up Period ins FTP Request Defaults Loop Count Fore HTTP Request Defaults HTTP Authorization Manager HTTP Cookie Manager HTTP Header Manager Java Request Defaults JDBC Connection Configuration JNDI Default Configuration LDAP Request Defaults LDAP Extended Request Defaults ALPHA TCP Sampler Config Save As Save Node As Image Ctrl Save Screen As Image Ctrl Shitt s Activate _ Scheduler Disable 65 Appendix C User Manual Here there should be changes for the default settings Server Name or IP set with jmeter config targetserver value Port Number set with jmeter config portnumber value and Protocol set with jmeter config protocol value Following figure shows the configuration iz U U C Documents and Settings manjulap Desktop Current jmeter TEST Apache JMeter File Edit Run Options Help 9 amp Invoice e E mom HTTP Request Defaults 288 HTTP Cookie Manager Name HTTP Re
6. Assertion WorkBench View Results Tree Name view Results Tree Write All Data to a File Filename oC seu check D imaccess jaas Login do S B imbooking businesstrip myb TN logout do TN start do C1 i_security_ check D imaccessijaas Login do S D imbooking businesstrip myb TN logout do S Password O Show Text Bender HTML Render XML C 75 Assertion Results Appendix C User Manual Adding Assertion Results into the Thread Group is as follows GG TESTO1 jmx J Current jmeter TESTO1 jmx Apache JMeter gt Logic Controller gt gt Assertion Results BeanShell Listener Run Options Help Remove Delete Listener Cut Ctri X Copy Ctrl C Paste Paste As Insert Sampler Assertions Timer Config Element Pre Processors Post Processors i i Ctri W Open Merge Save As Save Node As Image Save Screen As Image Ctl Shitt s Ctri G Activate Disable EI Response Assertion Distribution Graph alpha Graph Full Results Graph Results Monitor Results error Continue Stop Thread Stop Test Simple Data Writer Spline Visualizer Aggregate Graph Aggregate Report Summary Report View Results in Table View Results Tree This listener is very useful in debugging failed test cases DATESTO1 jmx C Documents and Settings manjulapDesktop Current jmeter TESTO1 jmx Apache JMeter File Edit Run O
7. Order Controller Runtime Controller Switch Controller Throughput Controller Transaction Controller While Controller Recording Controller Paste As Insert Config Element Pre Processors Open gt d gt Paste Ctrl Timer gt d gt Merge Save As Save Node As Image Ctrl L Scheduler Save Screen As Image Ctri Shifts Activate Disable 69 Appendix C User Manual Test Automation Framework specific scripts using two Simple Controllers for both Login and Logout iz UZU C Documents and Settings manjulap Desktop Current jmeter TEST Apache JMeter File Edit Run Options Help 9 amp Invoice e E tco Simple Controller Hit HTTP Cookie Manager Name Login Hif HTTP Request Defaults i t Gaussian Random Timer Hit CSV Data Set Contig CO Logout Ki WWorkBench Loop Controller Adding a Loop Controller into the Thread Group 1s as follows iz U U C Documents and Settings manjulap Desktop Current jmeter TEST Apache JMeter File Edit Run Options Help ogi Controller gt ForEach Controller Listener gt if Controller Sampler Include Controller Assertions Interleave Controller Paste Ctri V Timer Simple Controller b u r Paste REEI Config Element gt Loop Controller e Stop Thread Stop Test gt b Module Controller ssors Once Only Controller mes Random Controller HCH Ramp Upf Random Order Controller lg amp
8. Post Processors Activate Timer Disable d d Save As Assertions F H b d User Defined Variables Delete 62 Appendix C User Manual Added Thread Group has following default settings with it But for Preparing it to compatible with Test Automation Framework there should be changes in the default settings Fj apache JMeter File Edit Run Options Help 9 4 Invoice E Thread Group JE WorkBench Name Thread Group 1 Action to be taken after a Sampler error Continue Stop Thread Stop Test Thread Properties Number of Threads users 1 Ramp Up Period in seconds 1 Loop Count _ Forever 1 _ Scheduler jmeter config users value variable value replaced Number of Threads jmeter config rampup value variable value replaced Ramp Up Period and jmeter config iterations value variable value replaced Loop Count Thread Group Name can be set to the Test Case ID Following figure shows the exact settings that need to have Dap ache JMeter File Edit Run Options Help Invoice e E remi Thread Group ZS WorkBench Name TC001 Action to be taken after a Sampler error Continue Stop Thread Stop Test Thread Properties Number of Threads users jmeter config users value Ramp Up Period in seconds jmeter config rampup value Loop Count _ Forever jimeter config iterations value
9. Request Defaults Thread Delay Properties U z z S W Gaussian Random Timer Deviation in milliseconds 2000 0 IS VorkBench Constant Delay Offset in milliseconds 3000 67 Appendix C User Manual CSV Data Set Config This Element is optional for the scripts If there is a need of feeding data from a CSV file can be used in most of the load testing test cases this element can be used to fulfill that need Adding element to the Thread Group as follows apache JMeter File Edit Run Options Help Add gt Logic Controller 4 Remove Listener Cut Sampler Copy Assertions Dana A Config Element CSV Data Set Config Stop Test Pre Processors User Defined Variables er a Sampler error Open Post Processors Login Config Element Merge Simple Config Element Ramp Up Period On FTP Request Defaults Loop Count Fore HTTP Request Defaults HTTP Authorization Manager HTTP Cookie Manager HTTP Header Manager Save As Save Node As Image Ctrl Save Screen As Image Ctrli Shitt s Activate Scheduler Disable Hel p Java Request Defaults JDBC Connection Configuration JNDI Default Configuration LDAP Request Defaults LDAP Extended Request Defaults ALPHA TCP Sampler Config Changes need to the default settings Filename need to set as jmeter input file path INPUT_FILENAME Input file name should be declared in t
10. jmeter config testmode must set to regression jmeter config testmodules should set with project s or product s list jmeter config users should be set to T jmeter config iterations should be set to 1 jmeter config rampup should be set to 1 55 Appendix C User Manual testmodes load testmodules ntrayvel minvoice testecases minvoice_load_001 morder 00l Users 2 Iterations 3 rampup 1 This configuration run all the load test cases under the given project s or product s in one by one manner All the highlighted properties are used in this configuration jmeter config testmode must set to load jmeter config testmodules should set with project s or product s list jmeter config users can be set to any number jmeter config iterations can be set to any number jmeter config rampup can be set to any number Custom jmeter config testmode custoam jmeter contig testmodules mtravel minvoice contig testcases minvalce_ confiq users 2 config iterationss 3 config rampup 1 This configuration gives more flexibility of running test cases One or few specific test cases can run with this configuration In most of the load testing scenarios this will be very much useful All the highlighted properties are used in this configuration jmeter config testmode must set to custom jmeter config testcases can be used to define specific test case s jmeter config users c
11. properties file This property file contains the properties which are specific to the user Therefore this file should be placed in the user s home directory e g C Documents and Settings user name in windows and home user name in Linux Test Automation Framework specific properties are listed as follows with sample property values jmeter config protocol http jmeter config targetserver 192 168 1 206 jmeter config portnumber 8680 jmeter config testmode regression jmeter config testmodules mtravel jmeter config testcases mtravel_025 mtravel_049 jmeter config users 1 jmeter config iterations 1 jmeter config rampup 1 jmeter testmodules mapping mapping xml mecp test outputdir c temp mecp test usesnapshot false mecp test version 1 0 4 52 Appendix C User Manual Apart from these Test Automation Framework specific properties build properties file should contain following general properties maven repo remote http jupiter 9090 MavenCache repository maven jboss home D INSTALLATIONS boss 4 0 3SP1 maven jboss deploy dir maven jboss home server default deploy Test Automation Framework Features jmeter contig protocol http jmeter contig targqetserver L97 168 1 206 porthumber 8080 jmeter contig testmode load jmeter config testmodules mtravel minvoice meter contig testcases minvolce_load_OoL morder 00l jmeter config users 2 meter config 1terations L jmeter test
12. th gt lt tr gt lt xsl for each select testResults not tn preceding tn gt lt xsl variable name testcase pre select tn gt lt xsl variable name testcase select substring before testcase_pre We lt xsl variable name count select count tn current tn gt lt xsl variable name failureCount select count tn current tn lattribute s false gt lt xsl variable name successCount select count tn current tn attribute s true gt lt xsl variable name successPercent select successCount div count gt 42 Appendix A Code Segments lt xsl variable name totalTime select sum tn current tn t gt lt xsl variable name averageTime select totalTime div count gt lt tr bgcolor E8E8E8 gt lt xsl attribute name class gt lt xsl choose gt lt xsl when test failureCount amp gt 0 gt Failure lt xsl when gt lt xsl choose gt lt xsl attribute gt lt th gt lt xsl value of select testcase gt lt th gt lt th gt lt xsl if test failureCount gt 0 gt Failed lt xsl if gt lt xsl if test 0 gt failureCount gt Passed lt xsl if gt lt th gt lt th gt lt xsl value of select count gt lt th gt lt th gt lt xsl value of select failureCount gt lt th gt lt th gt lt xsl call template name display percent gt lt xsl with param name value select successPerce
13. the application server 60 Appendix C User Manual View Test Map This is a minor functionality which gives some visibility to the mecp test module This enables User to view the existing test cases and their descriptions m relevant module s User needs to run following command in the command line to view the test map It gives results in the console as depicted in the following figure H maven mecp test map VE _Apache__ ofp SH a intelligent projects i v 1 8 2 build start mecp test map get Getting http jupiter 7898 MavenCGache repository mecp Jjars mecp test Lunjar Expanding C temp tmp mecp test 1 84 4 jar into tempc lasses java java mtrave 1 java ACTIVE true java DESCRIPTION Travel Management Module BELEH Ljaual Ljaual BELEH Ljaual EEUE Ljaual BETET Ljaual BEIE java java java java java java java java java java java java java TESTCASE ACTIVE TYPE DESCRIPTION TESTCASE ACTIUE TYPE DESCRIPTION TESTCASE ACTIUE TYPE DES CRI PT I ON TESTCASE ACTIVE TYPE DESCRIPTION TESTCASE ACTIVE mtrave l bi true regression Search Travel Bills mtrave ABZ true regression Single Day Travel Domestic ntravel_ ABS true regression Single Day Travel Domestic ntravel _ HAA true regression Single Day Travel Domestic mtravel HAS true Creating Test Automation Framework Co
14. INPUTS_INPUT iterat or 48 Appendix Code Segments while inputlterator hasNext Element inputElement Element inputiterator next String input inputElement getTextQ System out printin l _ input PropertyEditor writeProperty ToFile Constants TESTPLAN_FILENAME Constants INPUT_CODE input modulelterator remove System out println catch Exception e System out println Exception executeTests e j j 49 Appendix B Environment Configuration Appendix B Environment Configuration Setting up the environment for both User and Developer is the initial workaround for using Test Automation Framework Following table shows the required installations _ User Developer jdk 1_5_0_06 jakarta jmeter 22 Badboy 2 0 1 J2SE Development Kit 4 Both User amp Developer should install the jdk 1_5_0_06 in environment The exact version 1s available at 5 JAVA HOME environment variable should be added and JAVA HOME Vun should append to the Path variable Apache Maven 1 Both User amp Developer should install the maven 1 0 2 in environment The exact version 1s available at 1 MAVEN HOME environment variable should be added and Ge MAVEN HOME bin should append to the Path variable 50 Appendix B Environment Configura
15. References 1 http maven apache org maven 1 x maven pdf 2 http jakarta apache org jmeter 3 http www adventnet com products qengine index html 4 http java sun com 5 http java sun com products archive j2se 5 0_06 index html 6 http www badboy com au 41 References Appendix Code Segments Appendix A CODE SEGMENTS XSL Code sample from report lt xsl template name pagelist gt lt table width 100 border 0 cellpadding 0 cellspacing 0 gt lt tr gt lt td align left width 7 height 7 colspan 2 gt lt img src images top_left gif alt gt lt img gt lt td gt lt td background images top_line gif gt lt td gt lt td align right width 7 height 7 colspan 2 gt lt img src 1mages top_right gif alt gt lt img gt lt td gt lt tr gt lt tr gt lt td bgcolor ABABAB width 1 gt lt td gt lt td width 6 gt lt td gt lt td align center gt lt table border 0 cellpadding 0 cellspacing 1 width 95 bgcolor FFFFFF gt lt tr gt lt th align left valign top height 25 gt lt img src 1mages testcases png alt Test Scenarios gt lt img gt lt th gt lt tr gt lt tr valign top bgcolor 999999 gt lt th gt TEST Case lt th gt lt th gt Status lt th gt lt th gt Tests lt th gt lt th gt Failures lt th gt lt th gt Success Rate lt th gt lt th gt Total Time lt th gt lt th gt Average Time lt th gt lt th gt Details lt
16. _LOAD ItestMode equals Constants MODE _REGR ESSION for int 1 0 i lt module length 1 Iterator modulelterator xmlParser getNodeList Constants XPATH_MODULE iterator while modulelterator hasNext Element moduleElement Element modulelterator next String moduleld xmlParser getChildNodeValue moduleElement Constants ELEMENT_MODU LE_MODULEID String moduleStatus xmlParser getChildNode V alue moduleElement Constants ELEMENT_MO DULE_ACTIVE if moduleStatus equals Constants STR_TRUE amp amp moduleld equals modulefi trim System out printin l moduleld PropertyEditor writeProperty ToFile Constants TESTPLAN_FILENAME Constants MODULE CODE moduleld Element testcasesElement moduleElement getChild Constants ELEMENT_MODULE_TESTCAS ES Iterator testcaselterator testcasesElement getChildren Constants ELEMENT_TESTCASES_TES TCASE iterator while testcaselterator hasNext Element testcaseElement Element testcaselterator next String testcaseld xmlParser getChildNodeValue testcaseElement Constants ELEMENT_TESTC ASE_ID String testcaseStatus xmlParser getChildNodeValue testcaseElement Constants ELEMENT _TE STCASE ACTIVE String testcaseType xmlParser getChildNodeValue testcaseElement Constants ELEMENT_TES TCASE_ TYPE 46 Appendix Code Segments if testcaseStatus equals Constants STR_TRUE amp amp testcaseT ype equals testMode System out printin _ te
17. ampler b HTTP Request s HTTP Request HTTPClient SOAP AML RPC Request WebService SOAP Request Access Log Sampler BSF Sampler BeanShell Sampler JUnit Request Java Request JDBC Request JMS Point to Point JMS Publisher JMS Subscriber LDAP Extended Request ALPHA LDAP Request Mail Reader Sampler TCP Sampler Test Action HTTP Request has lots of configurations and list of parameters Follow Redirects and Use KeepAlive checkboxes should be checked Important parameters can be replaced by variables which are defined in the relevant properties file 71 Appendix C User Manual DATEST jmx J Current jmeter TEST jmx Apache JMeter File Edit Run Options Help amp Invoice e E roo HTTP Request A HTTP Cookie Manager Name _security_check ag HTTP Request Defaults Web Server Wa Gaussian Random Timer A CSV Data Set Config 2 9 LA Login Port Number gt a HTTP Request 1S Core Logout Protocol default http Method POST JE WiorkBench Server Name or IP Path j_security_check _ Redirect Automatically Follow Redirects Use KeepAlive Send Parameters With the Request jo ve 1 Encode Include Equ j_company 002 minvoice load 001 j_company username 003 minvoice load 001 username j_username 004 minvoice load 001 j_username v E j_password 005 minvoice load 001 j_password KH
18. an be set to any number 56 Appendix C User Manual jmeter config iterations can be set to any number jmeter config rampup can be set to any number G jmeter testmodules mapping mapping xml mech test outputdir c temp jmeter testmodules mapping property contains the mapping file name which is using to configure and maintain all Test Cases included in the mecp test module There is nothing to change in this property right now mecp test outputdir property is there to configure Output Directory of the Test Automation Framework Test Automation Framework is designed to use this directory for extract mecp test module save test results amp archive test scripts mech test usesnapshot Talse mecp test version lt 1l 0 1 mecp test usesnapshot with this configuration user can switch between the locally build mecp test module version and downloaded mecp test version If the user change configuration to true the system will build mecp test module locally and use that jar file to test run If the user changes it to false the system will take the mecp test jar file version from the mecp test version property then automatically download it from the maven repository and use it with the test run 57 Appendix C User Manual Test Automation Framework Commands Test Automation Framework has two main functionalities 1 Execute Test Run 2 View Test Map Execute Tes
19. ent jmeter TEST jmx Apache JMeter File Edit Run Options Help 9 amp Invoice e E mom Response Assertion it HTTP Cookie Manager Name Response Assertion Hit HTTP Request Defaults Response Field to Test w Gaussian Random Timer it CSV Data Set Config e Login Pattern Matching Rules zecurtv Check esponse Assertion e Text Response URL Sampled Response Code Response Message _ Ignore Status Contains Matches Not Patterns to Test E Logout Patterns to Test LS WorkBench S elcome The most important assertion is adding to the Thread group as follows It is always checks for the common system errors which can be arise in any of the HTTP request Add all patterns According to the figure below iz TESTO1 jmx J Current jmeter TESTO1 jmx Apache JMeter File Edit Run Options Help d Invoice s e E mom Response Assertion Hit HTTP Cookie Manager Name Response Assertion AE HTTP Request Defaults Response Field to Test Wa Gaussian Random Timer Hit CSV Data Set Config e Login Pattern Matching Rules Text Response URL Sampled Response Code Response Message Ignore Status 7 istart do A ee D Response Assertion S i Contains gt Matches Not e A 5_security_check Patterns to Test U Response Assertion S Patterns to Test P imaccess aas Login do Exception D Response Assertion ServletException
20. he relevant property file and INPUT_FILENAME should be replaced by the variable which holds that input file name Variable Names can be filled with one or more variables and values in the CSV file can be access by these variables Following example clearly illustrates the scenario 68 Appendix C User Manual E minvoice_load_001 Notepad File Edit Format View Help MiNhvVoice MIN O1CE minvoice invoice OOL _username mar ak anda 1usr_ul mina ce GOL _password test Dap ache JMeter File Edit Run Options Help 9 amp Invoice e Be ton CSV Data Set Config Hit HTTP Cookie Manager Name CSY Data Set Config Hi HTTP Request Defaults Configure the CSV Data Source U i i T SE Gesin Filename jmeter input file path 001 minvoice load 001 01 _ Say Variable Names comma delimited invist Gel WorkBench mp Delimiter use t for tab Simple Controller Adding a Simple Controller into the Thread Group is as follows gt UZU C Documents and Settings manjulapDesktop Current jmeter TEST Apache JMeter File Edit Run Options Help B f D Ewe S Thread Group 4 Adi gt Logic Cc ForEach Controller If Controller Include Controller Remove Delete Listener Cut Ctrl X Sampler op Thread Stop Test Copy Ctrl C Assertions Interleave Controller Loop Controller Module Controller Post Processors Once Only Controller oop Count LIF Random Controller Random
21. jmx Apache JMeter File Edit Run Options Help 9 Invoice e E ro View Results in Table Hit HTTP Cookie Manager Name View Results in Table li HTTP Request Defaults Write All Data to a File Wa Gaussian Random Timer S 8 Filename _ Log Errors Only Hit CSV Data Set Contig s Login S 9 P fstart do S Sample Start Time Thread Name Label Sample Time 1 Success D Response Assertion S 118 53 08 246 TC001 1 1 fstart do 16 2 18 53 10 684 TCO0 1 1 _security_ch mg W T d 1 secuty_chect 318 53 13 637 TCOO11 1 __ imaccessijaa 781 Wo Response Assertion 4118 53 17 246 TC001 1 1 limbookingibu 454 O d ImaccessjaasiL ogin do 518 53 18 496 TCO0 1 1 ltogoutdo 6 W ON 6 18 53 18 653 TC001 1 1 fstatdo AR x 718 53 20 278 TCO01 1 1 _security_ch 750 ie aes 8 18 53 22 137 TCOO11 1 __ imaccessfjaa 1110 imbookingbusinesstripimybusinesstrips do 9 18 53 26 215 TC001 1 1 mbookingibu 422 L Response Assertion 10 18 53 27 372__ TC001 1 1 ogoutdo TI 47 s Logout S fogout do B Response Assertion View Results Tree Assertion Results D Response Assertion ZS WorkBench RII KA Ca No of Samples 10 Latest Sample 47 Average 465 74 View Results Tree Appendix C User Manual Adding View Results Tree into the Thread Group as follows DATESTO1 jmx J Current jmeter TESTO1 jmx Apache JMeter File Edit Run Options Help gt Logic Control
22. ler gt Remove Delete Listener z ee GR Ctrl X Sampler Assertions Copy Ctrl C gt Paste Ctri W Timer gt Paste As Insert Config Element gt u b Pre Processors Post Processors Open Merge Save As Save Node As Image Cti G Save Screen As Image Ctl Shitt G Activate Disable sinesstrips Response Assertion S Assertion Results BeanShell Listener Distribution Graph alpha Graph Full Results Graph Results s Continue Stop Thread Stop Test error Monitor Results Simple Data Writer Spline Visualizer Aggregate Graph Aggregate Report Summary Report View Results in Table View Results Tree This listener has two panes to show the requests tree and the output of each request This is the most important listener when it comes to debug failed test cases iz TESTO1 jmx C Documents and Settings manjulapDesktop Current jmeter TESTO1 jmx Apache JMeter File Edit Run Options Help Invoice es E tco 408 HTTP Cookie Manager Hif HTTP Request Defaults Wa Gaussian Random Timer Hit CSV Data Set Contig s Login o A istart do D Response Assertion 4_security_check D Response Assertion PP imaccess aasiLogin do Bi Response Assertion Core imbookinghusinesstripimybusinesstrips do Response Assertion Logout f Aogout do D Response Assertion View Results in Table Yiew Results Tree Assertion Results D Response
23. maven repository and extract it to the given location 58 Appendix C User Manual Protocol http Lerver 192 168 1 206 Port S688 Mode regression Modules ntravel TestCases mntravel 4825 mtravel 149 Users 1 Iterations Rampup mtravel HHL mtravel HZ mtravel HHS mtravel HAA mtraue l HHS mtravel Hb mtravel HAY mtravel HE mtravel HH mtravel 461i Sam mm mam mam emm mmm LR LR mamm ob heh java According to the User configuration test plan generates and it shows the tree view of test plan in the console echol Lecho copy Copying 1 file to G temphtmphtestcases copy Copying 1 file to C temp tmp properties Lecho B i mtravel HHi j_company Lecho HHz mtrave l 00i username Lecho J HAS mtravel HBi j_username Lecho Att mtravel Hi j_ password copy Copying 1 file to G temp tmp testcases copy Copying 1 File to CC temp tmp properties Lecho 461 e ntravel 662 company Lecho HAZ mtrave 1 462 username Lecho HAS mtravel 642 username Lecho J HA mttauel H 1 password According to the test plan all the test case files property files and input files are loading into the environment When Test Automation Framework loads each test case it will automatically populate the user defined variables 59 Appendix C User Manual Executing test plan C temptmp testcases ntraue 1 625 4mx Created the tree successfully Starting the test Tidying up
24. modules mapping mapping xml mecp test outputdir c temp mecp test usesnapshot false mecp test verstonsel 0 1 Feature Configurations jmeter config protocol http jmeter config targetserwer 192 168 1 206 jmeter config portnumber 8080 jmeter config protocol can define the Protocol which user is going to test In most of our scenarios it will be HTTP 53 Appendix C User Manual jmeter config targetserver can define the Server which is going to test If user is going to test an application running on a local machine the property value should be localhost and otherwise Server IP should be used jmeter config portnumber can simply define the Port which Application is running on jmeter config testmode regression jmeter config testmodules mtravel minvoice jmeter config testcases minvolce_load_o01 morder oO jmeter config users 2 jmeter config 1teratians 3 jmeter config rampup 1 This part of the configuration handles all test cases in the mecp test module System designed to handle test cases in very flexible manner jmeter config testmode property can be used to define the test mode There are 3 test modes called regression load and custom One of the test modes can be set to this property jmeter config testmodules property can be used to define the product s or project s the user is going to test Each project or product should be separated by a comma jme
25. mpatible Test Cases Creating Test Automation Framework specific scripts needs few steps to follow JMeter GUI should be used to create these scripts effectively Starting JMeter pop ups following GUI and what user should do is create the script with essential elements and save it according to the specific naming convention 61 Appendix C User Manual As the first thing change the Test Plan Name with relevant module name e g Invoice Travel Logistics Fj apache JMeter File Edit Run Options Help nvoice LS WorkBench Test Plan Name invoice Comments User Defined Variables Add Delete Run each Thread Group separately i e run one group before starting the next Functional Test Mode Select functional test mode only if you need to record to file the data received from the server for each request Selecting this option impacts performance considerably Add directory or jar to classpath Browse Delete Clear Library Thread Group There are essential elements in each and every script Thread Group is the main element in the Test Plan Test Case or Script Adding Thread Group to the Test Plan can be done by the JMeter GUI as follows Apache JMeter File Edit Run Options Help Thread Group es Listener Merge Config Element Save Node As Image Ct Pre Processors Save Screen As Image Ctl Snin o
26. nt gt lt xsl call template gt lt th gt lt th gt lt xsl call template name display time gt lt xsl with param name value select total Time gt lt xsl call template gt lt th gt lt th gt lt xsl call template name display time gt lt xsl with param name value select averageTime gt lt xsl call template gt lt th gt lt th gt lt xsl if test failureCount gt 0 gt lt a href gt lt xsl attribute name href gt lt xsl text gt javascript change page_details_ lt xsl value of select position gt lt xsl attribute gt lt img src images expand_f png alt expand collapse gt lt xsl attribute name 1d gt lt xsl text gt page_details_ lt xsl value of select position gt _image lt xsl attribute gt lt img gt lt a gt 43 Appendix Code Segments lt xsl if gt lt xsl if test 0 gt failureCount gt lt a href gt lt xsl attribute name href gt lt xsl text gt javascript change page_details_ lt xsl value of select position gt lt xsl attribute gt lt img src images expand_p png alt expand collapse gt lt xsl attribute name 1d gt lt xsl text gt page_details_ lt xsl value of select position gt _image lt xsl attribute gt lt img gt lt a gt lt xsl 1f gt lt th gt lt tr gt lt Test Case Details goes here gt lt tr class page_details bgcolor FFFFFF gt lt xsl attribute name 1d gt l
27. ptions Help 9 amp Invoice es E rom Hit HTTP Cookie Manager Hif HTTP Request Defaults Wa Gaussian Random Timer Hig CSV Data Set Config Login o A istart do D Response Assertion P 4_security_check D Response Assertion imaccess aasiLogin do D Response Assertion s Core P fmbooking businesstrip mybusinesstrips da D Response Assertion s Logout P Aogout do D Response Assertion View Results in Table View Results Tree a Response Assertion WorkBench Assertion Results Name Assertion Results Write All Data to a File Filename Assertions start do j_security_check maccess jaas Login do mbooking businesstrip mybusinesstrips do Test failed text expected not to contain Search business trips logout do start do j_security_check maccess jaas Login do mbooking businesstrip mybusinesstrips do Test failed text expected not to contain Search business trips logout do 76 Browse _ Log Errors Only
28. quest Defaults Hi HTTP Request Defaults Server Name or IP limeter config targ etservervalue 2 WorkBench Port Number imeter config portnumber value Protocol default http jmeter config protocol value Path Send Parameters With the Request Value Encode Include Equ Add Delete _ Retrieve All Embedded Resources from HTML Files 66 Appendix C User Manual Gaussian Random Timer Adding Gaussian Random Timer into the Thread Group can e done as follows Apache JMeter File Edit Run Options Help Adda o Logic Controller gt Listener b Cut Sampler b Copy Assertions gt 4 Paste Timer gt BeanShell Timer oies Config Element gt Constant Throughput Timer gt top Thread Stop Test Pre Processors Synchronizing Timer Open Post Processors gt Constant Timer Merge SRE d TT Gaussian Random Timer Save As A Nam Ramp Up Period in Uniform Random Timer Save Node As Image Ctrl Loop Count Forever 1 Save Screen As Image ii Activate _ Scheduler Disable Default settings of the Deviation should be changed to 2000 and Constant Delay Offset should be changed to 3000 A Apache JMeter File Edit Run Options Help 9 amp Invoice I I e E ronn Gaussian Random Timer AE HTTP Cookie Manager Name Gaussian Random Timer Hif HTTP
29. stcaseld PropertyEditor writeProperty ToFile Constants TESTPLAN_FILENAME Constants TESTCASE CODE testcaseld String propertyFileName testMainDir S ystem getProperty file separator moduleId System getProperty file separator Constants FOLDER_JMETER System getProperty file se parator Constants FOLDER_PROPERTIES S ystem getProperty file separator testc aseld Constants PROPERTIES FILE EXT PropertyEditor writeToPropertyFile propertyFileName Constants PROPERTY_FILENA ME Element inputsElement testcaseElement getChild Constants ELEMENT_TESTCASE INPUTS Iterator inputiterator tnputsElement getChildren Constants ELEMENT_INPUTS_INPUT iterat Or while inputlterator hasNext Element inputElement Element inputiterator next String input inputElement getTextQ System out printin _ input PropertyEditor writeProperty ToFile Constants TESTPLAN_FILENAME Constants INPUT_CODE input j j j j j modulelterator remove j else if testMode equals Constants MODE_CUSTOM for int j 0 j lt testcase length j Iterator modulelterator xmlParser getNodeList Constants XPATH_MODULE terator while modulelterator hasNext Element moduleElement Element modulelterator next 47 Appendix A Code Segments String moduleId xmlParser getChildNode Value moduleElement Constants ELEMENT MODUL LE_MODULEID String moduleStatus xmlParser getChildNode V alue moduleElement Cons
30. t gt lt img gt lt td gt lt tr gt lt table gt lt xsl template gt Java Code Segment of the executesTests method public void executeTests String mappingFilePath String testMainDir String testModules String testMode String users String iterations String rampUp String testCases try System out println System out println Generating test plan and userdefined variables files System out println String module commonUtils commaSeparatedStringToStringArray testModules String testcase commonUtils commaSeparatedStringToStringArray testCases PropertyEditor writeProperty ToFile Constants TESTPLAN_FILENAME Constants TEST MODE testMode PropertyEditor writeProperty ToFile Constants TESTPLAN_FILENAME Constants NUMBER USERS users PropertyEditor writeProperty ToFile Constants TESTPLAN_FILENAME Constants NUMBER_ ITERATIONS iterations PropertyEditor writeProperty ToFile Constants TESTPLAN_FILENAME Constants RAMPUP_TIME rampUp XMLParser xmlParser new XMLParser mappingFilePath System out println System out printin TEST PLAN 45 Appendix A Code Segments System out println if testMode equals Constants MODE
31. t Run In order to execute a test run User needs to run following command in the command line gt maven mecp test work Using command line console log User can get the clear idea of the ongoing process of the test run H mauen mecp test uork wei Lo Apache _ SA d se intelligent projects i i i u 1 8 2 mr build start mnecp test work build start mecp test c lean delete Deleting directory C tempresults delete Deleting directory G temp c lasses delete Deleting directory C temp tmp delete Deleting directory D INSTALLATIONS jhoss 4 8 35Pl server default de mecp test init mkdir Created dir mkdir Created dir mkdir Created dir mkdir Created dir mkdir Created dir mkdir Created dir Coxtenp tmp C temp results Co temp c lasses D INSTALLATIONS jbhoss 4 68 35Pl server default deplou te D INSTALLATIONS Jboss 4 68 36FPl server default deploy te D INSTALLATIONS boss 4 68 35Pl server default deplou te As depicted in the figure Test Automation Framework cleans all the temporary files and makes necessary new files in the environment mecp test build Lecho snapshot build false get Getting http jupiter H90 NavenCache re pos itory mecp jars mecp test Lunjar Expanding C temp tmp mecp test 1 6 4 jar into C temp classes copy Copying 17 Files to CC temp results Then it downloads exact version of the mecp test module from the
32. t xsl text gt page details_ lt xsl value of select position gt lt xsl attribute gt lt td colspan 8 bgcolor FFFFFE gt lt div align center gt lt br gt lt b gt Details for Page lt xsl value of select testcase gt lt b gt lt table border 0 cellpadding 0 cellspacing 1 width 95 bgcolor FFFFFF gt lt tr bgcolor 63BB8A gt lt th gt Request URL lt th gt lt th gt Time milliseconds lt th gt lt th gt B ytes lt th gt lt th gt Success lt th gt lt tr gt lt xsl for each select tn testcase_pre gt lt tr bgcolor EOEFE7 gt lt td gt lt xsl value of select Ib gt lt td gt lt td align right gt lt xsl value of select t gt lt td gt lt td align right gt lt xsl value of select by gt lt td gt lt td align center gt lt xsl value of select s gt lt td gt lt tr gt lt xsl for each gt lt table gt lt br gt lt div gt 44 Appendix Code Segments lt td gt lt tr gt lt xsl for each gt lt table gt lt br gt lt td gt lt td width 6 gt lt td gt lt td bgcolor ABABAB width 1 gt lt td gt lt tr gt lt tr gt lt td align left width 7 height 7 colspan 2 gt lt img src 1mages bot_left gif alt gt lt img gt lt td gt lt td background images bot_line gif gt lt td gt lt td align right width 7 height 7 colspan 2 gt lt img src 1mages bot_right gif al
33. tants ELEMENT_MO DULE_ACTIVE if moduleStatus equals Constants STR_TRUE Element testcasesElement moduleElement getChild Constants ELEMENT_MODULE_TESTCAS ES Iterator testcaselterator testcasesElement getChildren Constants ELEMENT_TESTCASES_TES TCASE terator while testcaselterator hasNext Element testcaseElement Element testcaselterator next String testcaseld xmlParser getChildNodeValue testcaseElement Constants ELEMENT_TESTC ASE_ID String testcaseStatus xmlParser getChildNodeV alue testcaseElement Constants ELEMENT _TE STCASE_ ACTIVE if testcaseStatus equals Constants STR_TRUE amp amp testcase j equals testcaseld trim PropertyEditor writeProperty ToFile Constants TESTPLAN_FILENAME Constants MODULE_CODE moduleld PropertyEditor writeProperty ToFile Constants TESTPLAN_FILENAME Constants TESTCASE CODE testcaseld System out printin testcaseld String propertyFileName testMainDir S ystem getProperty file separator moduleId System getProperty file separator Constants FOLDER_JMETER System getProperty file se parator Constants FOLDER_PROPERTIES S ystem getProperty file separator testc aseld Constants PROPERTIES FILE EXT PropertyEditor writeToPropertyFile propertyFileName Constants PROPERTY_FILENA ME Element inputsElement testcaseElement getChild Constants ELEMENT_TESTCASE_ INPUTS Iterator inputlterator inputsElement getChildren Constants ELEMENT_
34. ter config testcases property can be used to define specific test case s Each test case should be separated by a comma jmeter config users property can be used to define the number of threads users for the test case s Each thread will execute the test case in its entirety and completely independently of other test threads Multiple threads are used to simulate concurrent connections to server application 54 Appendix C User Manual jmeter config iterations property can be used to define the number of iterations loops for the test case s Each thread will execute this number of iterations jmeter config rampup property can be used to define the ramp up period The ramp up period tells the system how long to take to ramp up to the full number of threads chosen If 10 threads are used and the ramp up period is 100 seconds then the system will take 100 seconds to get all 10 threads up and running Each thread will start 10 100 10 seconds after the previous thread was begun Regression Load and Custom mode configurations and their capabilities as follows Regression config testmode regression config testmodules mtravel minyoice Cestcases mninvorce_ 001 morder OO config users 1 config iterations 1 config rampup 1 This configuration run all the regression test cases under the given projects or products in one by one manner All the highlighted properties are used in this configuration
35. tion Apache JMeter 2 Developer needs to install jakarta jmeter 2 2 in the environment in order to create and edit automated test scripts When User executes a test run there might be some failed test cases in the final analysis In that case user can perform a separate test run for particular test cases with JMeter GUI Test Automation Framework itself has an archive of ready to run test cases So installing jakarta jmeter 2 2 in User s machine is optional no dependency in executing test run but it can be very useful jakarta jmeter 2 2 binary is available at 2 JMETER HOME environment variable should be added and Ge JMETER_HOME bin should append to the Path variable Badboy 6 Developer needs to install Badboy 2 0 1 in order to record test cases So User don t need this to be installed in the environment The exact version 1s available 6 51 Appendix C User Manual Appendix C User Manual Installation amp Configuration In order to use the Test Automation Framework User has to download maven mecp test plugin into the environment Download maven mecp test plugin Run the following command in the command line amp it will automatically download and install maven mecp test plugin in the environment gt maven plugin download DgroupId mecp Dartifactid maven mecp test plugin Dversion 2 0 4 Configuration of build
36. up value Loop Coun Runtime Controller srations value Switch Controller Throughput Controller Transaction Controller While Controller Recording Controller Pre Processors Post Proce Open Merge Save As Save Node As Image Ctrl Save Screen As Image Ctri Shift G Activate C Sched Disable n Test Automation Framework specific scripts using a loop controller to handle the core of the test case 70 iz U U C Documents and Settings manjulap Desktop Current jmeter TEST Apache JMeter File Edit Run Options Help 9 amp Invoice K e E tco JE HTTP Cookie Manager Hit HTTP Request Defaults OJ Gaussian Random Timer Hit CSV Data Set Contig Login s Logout WorkBench HTTP Request Loop Count Forever 1 Loop Controller Appendix C User Manual Name Core Adding a HTTP Request into a Simple Controller or Loop Controller is as follows iz TEST jmx J Current jmeter TEST jmx Apache JMeter File td Edit Run Options Help Add Insert Parent gt Logic Controller gt Remove Cut Copy Paste Paste As Insert Open Merge Save As Save Node As Image Ctl Assertions Config Element Timer Listener Pre Processors Post Processors PER Save Screen As Image Cti shitte Activate Disable Help b gt b gt FTP Request AJP 1 3 S

Download Pdf Manuals

image

Related Search

View/Open view open windows view open ports windows view open apps view open files view open tabs view open ports linux view open and touch info view open vemis live version view open tabs mobile on desktop edge view open ports view open positions view openapi json view open tabs in edge view open files on server view open windows as tiles the file couldn\u0027t open in protected view open my inbox gmail view task view icon open excel file couldn\u0027t open in protected view openedge view login open view decoder prices open folder to view files

Related Contents

Instrucciones de planificación y montaje  manuale nuvola maggio 2005 ultime modifiche per pdf  Owners Manual - Desert Aircraft  `opposer à sa hiérarchie quand elle se trompe  Notice - Castorama  

Copyright © All rights reserved.
Failed to retrieve file