{"id":2449,"date":"2022-06-30T10:00:51","date_gmt":"2022-06-30T10:00:51","guid":{"rendered":"https:\/\/loadfocus.com\/blog\/?p=2449"},"modified":"2023-09-03T14:09:48","modified_gmt":"2023-09-03T14:09:48","slug":"performance-testing-of-oauth-2-0-secured-apps-and-services","status":"publish","type":"post","link":"https:\/\/loadfocus.com\/blog\/2022\/06\/performance-testing-of-oauth-2-0-secured-apps-and-services","title":{"rendered":"Performance Testing of OAuth 2.0 Secured Apps and Services"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\"><\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes read<\/span><\/span>\n<p class=\"lead\"><a href=\"https:\/\/loadfocus.com\/\">LoadFocus<\/a> now provides easy testing for services that are using OAuth authorization (we support OAuth2.0 as OAuth1.0 was retired in 2012).<\/p>\n\n\n\n<p>We support all the OAuth 2.0 grant types:<\/p>\n\n\n\n<ul><li>Authorization Code <\/li><li>Implicit<\/li><li>Password Credentials<\/li><li>Client Credentials<\/li><li>Refresh Token<\/li><\/ul>\n\n\n\n<p>For testing a service that is behind a login (that has OAuth authorization) the only thing the user needs to do is:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"782\" height=\"366\" src=\"https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/Screenshot-2022-06-30-at-12.51.28.png\" alt=\"\" class=\"wp-image-2456\" srcset=\"https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/Screenshot-2022-06-30-at-12.51.28.png 782w, https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/Screenshot-2022-06-30-at-12.51.28-600x281.png 600w, https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/Screenshot-2022-06-30-at-12.51.28-768x359.png 768w\" sizes=\"(max-width: 782px) 100vw, 782px\" \/><figcaption>Select OAuth 2.0 Authorization Type from the New Load Test page<\/figcaption><\/figure>\n\n\n\n<ul><li>Go to <em><strong>Services -> <a href=\"https:\/\/loadfocus.com\/load-testing\" title=\"load testing in the cloud\">Load Testing<\/a> -> New Test<\/strong><\/em><\/li><li>On the &#8220;New Test&#8221; page select the &#8220;Authorization type&#8221; as OAuth 2.0 and the &#8220;Grant type&#8221; that is used for OAuth authorization as in the image below<\/li><li>Once the &#8220;Grant type&#8221; has been selected you will need to populate the details for that specific grant type (the details can be found either by accessing the interface of the OAuth provider or from the team that is in charge of the OAuth provider integration)<\/li><li>Once the details are entered the only thing left to do is to enter the APIs that are going to be tested<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/Screenshot-2022-06-30-at-12.51.58-1280x525.png\" alt=\"\" class=\"wp-image-2457\" width=\"580\" height=\"237\" srcset=\"https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/Screenshot-2022-06-30-at-12.51.58-1280x525.png 1280w, https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/Screenshot-2022-06-30-at-12.51.58-800x328.png 800w, https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/Screenshot-2022-06-30-at-12.51.58-600x246.png 600w, https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/Screenshot-2022-06-30-at-12.51.58-768x315.png 768w, https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/Screenshot-2022-06-30-at-12.51.58-1536x630.png 1536w, https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/Screenshot-2022-06-30-at-12.51.58-2048x840.png 2048w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><figcaption>Configure OAuth 2.0 for Performance Test<\/figcaption><\/figure>\n\n\n\n<p>The call to the authorization server will be done only once before the performance testing of the API endpoints starts. A token will be retrieved from the authorization server and the token is going to be used to make the calls for testing the APIs in the created test configuration.<\/p>\n\n\n\n<p>We are not going to make more than 1 call to the authorization server as that will more likely result in a &#8220;429 Too Many Requests&#8221; error.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><a href=\"https:\/\/loadfocus.com\"><img loading=\"lazy\" width=\"870\" height=\"360\" src=\"https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/sign-up.jpeg\" alt=\"\" class=\"wp-image-2301\" srcset=\"https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/sign-up.jpeg 870w, https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/sign-up-800x331.jpeg 800w, https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/sign-up-600x248.jpeg 600w, https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/sign-up-768x318.jpeg 768w\" sizes=\"(max-width: 870px) 100vw, 870px\" \/><\/a><figcaption>Cloud Testing Platform for Websites and APIs.<\/figcaption><\/figure>\n\n\n\n<p><em>Written by&nbsp;Chris R.<\/em><\/p>\n\n\n\n<p><em><a href=\"https:\/\/loadfocus.com\/\">LoadFocus<\/a>&nbsp;is a cloud testing platform,&nbsp;a&nbsp;<a href=\"https:\/\/loadfocus.com\/load-testing\" target=\"_blank\" rel=\"noreferrer noopener\">load and stress testing tool<\/a>&nbsp;which provides the infrastructure to run tests with thousands of concurrent users, from&nbsp;<a href=\"https:\/\/loadfocus.com\/locations\">multiple cloud locations<\/a>, in less than a few minutes, keep history of the results, compare different runs to inspect performance improvements or performance degradation.<\/em>&nbsp;<em>It also supports running&nbsp;<a href=\"https:\/\/loadfocus.com\/jmeter-load-testing\" target=\"_blank\" rel=\"noreferrer noopener\">JMeter load tests from the cloud<\/a><\/em>&nbsp;and&nbsp;<a href=\"https:\/\/loadfocus.com\/page-speed-monitoring\">monitoring and audit web and mobile performance<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\"><\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes read<\/span><\/span>LoadFocus now provides easy testing for services that are using OAuth authorization (we support OAuth2.0 as OAuth1.0 was retired in 2012). We support all the OAuth 2.0 grant types: Authorization Code Implicit Password Credentials Client Credentials Refresh Token For testing a service that is behind a login (that has OAuth authorization) the only thing the&#8230;  <a href=\"https:\/\/loadfocus.com\/blog\/2022\/06\/performance-testing-of-oauth-2-0-secured-apps-and-services\" class=\"more-link\" title=\"Read Performance Testing of OAuth 2.0 Secured Apps and Services\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":2455,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[337,6,379,125],"tags":[393,394],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/posts\/2449"}],"collection":[{"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/comments?post=2449"}],"version-history":[{"count":1,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/posts\/2449\/revisions"}],"predecessor-version":[{"id":2765,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/posts\/2449\/revisions\/2765"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/media\/2455"}],"wp:attachment":[{"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/media?parent=2449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/categories?post=2449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/tags?post=2449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}