{"id":7143,"date":"2020-04-01T14:59:34","date_gmt":"2020-04-01T14:59:34","guid":{"rendered":"https:\/\/cloudkul.com\/blog\/?p=7143"},"modified":"2020-04-02T07:50:02","modified_gmt":"2020-04-02T07:50:02","slug":"performing-login-authentication-for-bagisto-using-jmeter","status":"publish","type":"post","link":"https:\/\/cloudkul.com\/blog\/performing-login-authentication-for-bagisto-using-jmeter\/","title":{"rendered":"Benchmarking Bagisto for Login operation using JMeter"},"content":{"rendered":"\n<p>In our <a href=\"https:\/\/cloudkul.com\/blog\/how-to-record-scenerios-with-apache-jmeter\/\">last blog<\/a> of Apache JMeter series we saw how  we can record scenerios using Apache JMeter. In this blog we will see how to record and perform login authentication for Bagisto E-commerce using Apache JMeter.<\/p>\n\n\n\n<p><strong>STEP 1.<\/strong>   Record the requests for login operation for your Bagisto store, just like we did in our previous <a href=\"https:\/\/cloudkul.com\/blog\/how-to-record-scenerios-with-apache-jmeter\/\">blog<\/a>. Now after setting up every element in JMeter, click on start then go to your browser and type your bagisto store domain\/IP address.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"426\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2020\/04\/logn-1024x426.png\" alt=\"\" class=\"wp-image-7147\" \/><\/figure>\n\n\n\n<p><strong>STEP 2. <\/strong> Now once the login is successful, Stop your recording. Now all the requests for login operations have been recorded successfully.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"573\" height=\"436\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2020\/04\/Requests.png\" alt=\"\" class=\"wp-image-7151\" \/><\/figure>\n\n\n\n<p><strong>STEP 3.<\/strong>  Now select all your requests cut and paste them under <em><strong>Thread<\/strong><\/em>. and add the following elements: &#8211;<\/p>\n\n\n\n<ol><li><a href=\"https:\/\/jmeter.apache.org\/usermanual\/component_reference.html#CSV_Data_Set_Config\">CSV Data set login<\/a> :- For passing the username and password as variables.<\/li><li><a href=\"https:\/\/www.blazemeter.com\/blog\/using-http-cookie-manager-jmeter-not-cookie-jar\/\">HTTP Cookie Manager<\/a>:- If you have an HTTP Request and the response contains a cookie, the Cookie Manager automatically stores that cookie and will use it for all future requests to that particular web site.<\/li><li><a href=\"https:\/\/jmeter.apache.org\/usermanual\/listeners.html\">Listener<\/a> :- To view the results of our test.<\/li><li><a href=\"https:\/\/jmeter.apache.org\/usermanual\/component_reference.html#timers\">Timer<\/a> :- To introduce some delay between our requests.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"499\" height=\"470\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2020\/04\/FINAL-RESULT.png\" alt=\"\" class=\"wp-image-7155\" \/><figcaption><em>The final test plan should look like this<\/em><\/figcaption><\/figure>\n\n\n\n<p><strong>STEP 4.<\/strong> Now comes the most important part i.e &#8220;<strong>Extracting the CSRF Token<\/strong>&#8220;.<\/p>\n\n\n\n<p><strong>CSRF<\/strong> stands for Cross-Site Request Forgery. Generally, when we log into a website, it always asks for authentication. From a security point-of-view, developers mostly time pass the CSRF token with a login parameter. But our focus is on how to handle this CSRF token in JMeter.<\/p>\n\n\n\n<p>For extracting CSRF, we have to add post processors under the <strong>GET REQUEST<\/strong> in the test plan. Then, add a <strong>regular expression extractor<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"905\" height=\"345\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2020\/04\/REGULAR-EXPRESSION.png\" alt=\"\" class=\"wp-image-7158\" \/><\/figure>\n\n\n\n<p><strong>STEP 5.<\/strong> Create a csv file containing username, password of all users and  add the CSV data set config file under the thread group.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"786\" height=\"375\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2020\/04\/CSV.png\" alt=\"\" class=\"wp-image-7160\" \/><\/figure>\n\n\n\n<p><strong>STEP 6.<\/strong> <\/p>\n\n\n\n<p>  Passing all the variables i.e. token, user, pass for login and authentication.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"546\" height=\"386\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2020\/04\/oie_IQ93oHLt0yAJ.png\" alt=\"\" class=\"wp-image-7163\" \/><\/figure>\n\n\n\n<p><strong>STEP 7<\/strong>. Now we are good to go, click on <em><strong>Thread Group<\/strong><\/em> and enter the number of threads and ramp-up period for which you want to test your bagisto store. In this blog we will test our Bagisto store for :-<\/p>\n\n\n\n<ol><li><strong>Number of threads (users):-<\/strong> 10<\/li><li><strong>Ramp-up:<\/strong>&#8211; 0 sec<\/li><\/ol>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>STEP 8.<\/strong> Check your results under the<em><strong> listener<\/strong><\/em>  you have choose for your Plan. In this blog we are using <em><strong>Summary Report<\/strong><\/em> listener.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"781\" height=\"482\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2020\/04\/RESULTS.png\" alt=\"\" class=\"wp-image-7166\" \/><\/figure>\n\n\n\n<p>As you can see we have successfully tested login authentication with 10 users on our Bagisto E-commerece store.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h3>\n\n\n\n<p>You have successfully record and perform Login authentication for your Bagisto Store.<\/p>\n\n\n\n<p>In case of any help or query, please&nbsp;<a href=\"https:\/\/cloudkul.com\/contact\/\">contact&nbsp;us<\/a>&nbsp;or raise a&nbsp;<a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\">ticket.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our last blog of Apache JMeter series we saw how we can record scenerios <a class=\"text-primary\" title=\"read more\" href=\"https:\/\/cloudkul.com\/blog\/performing-login-authentication-for-bagisto-using-jmeter\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":25,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[87],"tags":[213,367,366,243,205],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Benchmarking Bagisto for Login operation using JMeter - Cloudkul<\/title>\n<meta name=\"description\" content=\"In this blog we will see how to record and perform login authentication for Bagisto E-commerce using Apache JMeter.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudkul.com\/blog\/performing-login-authentication-for-bagisto-using-jmeter\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Benchmarking Bagisto for Login operation using JMeter - Cloudkul\" \/>\n<meta property=\"og:description\" content=\"In this blog we will see how to record and perform login authentication for Bagisto E-commerce using Apache JMeter.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudkul.com\/blog\/performing-login-authentication-for-bagisto-using-jmeter\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudkul\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-01T14:59:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-02T07:50:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2020\/04\/logn-1024x426.png\" \/>\n<meta name=\"author\" content=\"Ayush Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudkul.com\/blog\/performing-login-authentication-for-bagisto-using-jmeter\/\",\"url\":\"https:\/\/cloudkul.com\/blog\/performing-login-authentication-for-bagisto-using-jmeter\/\",\"name\":\"Benchmarking Bagisto for Login operation using JMeter - Cloudkul\",\"isPartOf\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\"},\"datePublished\":\"2020-04-01T14:59:34+00:00\",\"dateModified\":\"2020-04-02T07:50:02+00:00\",\"author\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/bc944fcbc7bf57b5c555d7b088523f1b\"},\"description\":\"In this blog we will see how to record and perform login authentication for Bagisto E-commerce using Apache JMeter.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/performing-login-authentication-for-bagisto-using-jmeter\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudkul.com\/blog\/performing-login-authentication-for-bagisto-using-jmeter\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudkul.com\/blog\/performing-login-authentication-for-bagisto-using-jmeter\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Benchmarking Bagisto for Login operation using JMeter\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\",\"url\":\"https:\/\/cloudkul.com\/blog\/\",\"name\":\"Cloudkul\",\"description\":\"Host your eCommerce Store on AWS with Optimized Performance\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudkul.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/bc944fcbc7bf57b5c555d7b088523f1b\",\"name\":\"Ayush Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6c01625f859badb9f845442bb4179cde?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6c01625f859badb9f845442bb4179cde?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"caption\":\"Ayush Singh\"},\"url\":\"https:\/\/cloudkul.com\/blog\/author\/ayushsingh-cloud332\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Benchmarking Bagisto for Login operation using JMeter - Cloudkul","description":"In this blog we will see how to record and perform login authentication for Bagisto E-commerce using Apache JMeter.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudkul.com\/blog\/performing-login-authentication-for-bagisto-using-jmeter\/","og_locale":"en_US","og_type":"article","og_title":"Benchmarking Bagisto for Login operation using JMeter - Cloudkul","og_description":"In this blog we will see how to record and perform login authentication for Bagisto E-commerce using Apache JMeter.","og_url":"https:\/\/cloudkul.com\/blog\/performing-login-authentication-for-bagisto-using-jmeter\/","og_site_name":"Cloudkul","article_published_time":"2020-04-01T14:59:34+00:00","article_modified_time":"2020-04-02T07:50:02+00:00","og_image":[{"url":"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2020\/04\/logn-1024x426.png"}],"author":"Ayush Singh","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/cloudkul.com\/blog\/performing-login-authentication-for-bagisto-using-jmeter\/","url":"https:\/\/cloudkul.com\/blog\/performing-login-authentication-for-bagisto-using-jmeter\/","name":"Benchmarking Bagisto for Login operation using JMeter - Cloudkul","isPartOf":{"@id":"https:\/\/cloudkul.com\/blog\/#website"},"datePublished":"2020-04-01T14:59:34+00:00","dateModified":"2020-04-02T07:50:02+00:00","author":{"@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/bc944fcbc7bf57b5c555d7b088523f1b"},"description":"In this blog we will see how to record and perform login authentication for Bagisto E-commerce using Apache JMeter.","breadcrumb":{"@id":"https:\/\/cloudkul.com\/blog\/performing-login-authentication-for-bagisto-using-jmeter\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudkul.com\/blog\/performing-login-authentication-for-bagisto-using-jmeter\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cloudkul.com\/blog\/performing-login-authentication-for-bagisto-using-jmeter\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Benchmarking Bagisto for Login operation using JMeter"}]},{"@type":"WebSite","@id":"https:\/\/cloudkul.com\/blog\/#website","url":"https:\/\/cloudkul.com\/blog\/","name":"Cloudkul","description":"Host your eCommerce Store on AWS with Optimized Performance","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudkul.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/bc944fcbc7bf57b5c555d7b088523f1b","name":"Ayush Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6c01625f859badb9f845442bb4179cde?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6c01625f859badb9f845442bb4179cde?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","caption":"Ayush Singh"},"url":"https:\/\/cloudkul.com\/blog\/author\/ayushsingh-cloud332\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/7143"}],"collection":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/comments?post=7143"}],"version-history":[{"count":23,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/7143\/revisions"}],"predecessor-version":[{"id":7183,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/7143\/revisions\/7183"}],"wp:attachment":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/media?parent=7143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/categories?post=7143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/tags?post=7143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}