Skip to content
  • ZipCode Api
  • Blog
  • About RedLine13
RedLine13
RedLine13
Primary Navigation Menu
Menu
  • Start Testing
  • Demo
  • Pricing
  • JMeter
  • Partners
  • Docs
    • Documentation Home
    • AWS Set Up for load testing
    • AWS Approval for Large Tests
    • PHP, NodeJS, Python Load Tests
    • Scalability
    • Jenkins Plugin Setup
    • Premium Features
    • Knowledge Base

JMeter Load Testing against Public APIs (Bing Use Case)

By: Rich Friedman

It is not unusual for an application to require hitting a third party endpoint from your own server-side requests.  However, hitting that end point during a load test can lead to serious problems.  

  • Vendor limits: Bing free has a 5,000 / month limit and unpublished per minute and daily limits. 
  • Vendor policy: Determined to be hitting request limits in high bursts can get an account locked

If you are determined your load test will access all backend resource you are best to contact the provider and work with them on a thorough load testing plan.   

If your existing code requires results from third party backend you are best to work out mock data and service strategies for your particular development stack. 

Here is a walkthrough of a Load Test Plan accessing Bing Search API and the rate limit errors we received.

Building the Bing Load Test required 

  1. HTTP Authorization Manager for the Azure MarketPlace API 
    • You need to have your API Key and enter that in the password field.
    • The Base URL should be (For web) https://api.datamarket.azure.com/Bing/Search/v1/Web
    • Screen Shot 2015-02-11 at 12.34.31 AM
  2. Setup HTTP Request Defaults
  3. Data from CSV 
    • This was to alternate our query strings.  We used the 10,000 most common words list from http://www.mit.edu/~ecprice/wordlist.10000
    • Variable name word
    • Screen Shot 2015-02-11 at 12.36.51 AM
  4. HTTP Request 
    • Path : /Bing/Search/v1/Web
    • Send Parameters with request
      1. Query : ‘${word}’  (the ‘ are required) – encode this field
      2. $format : json 
    • Screen Shot 2015-02-11 at 12.37.48 AM

To demonstrate hitting the limits, we executed the Load Plan with 5 servers, 100 Users per server, 11 iterations.

Performance results, Wordlist, and JMX file available in this example Load Plan.  You can

Instead of hitting the 5,000 maximum limit for the free tier, we quickly bumped into an unpublished per minute rate limit.  This generated the following errors and locked us out from testing.  If you were testing something like this against your production API key, you could have locked out real user behavior.

Code(503) Message(The number of requests per minute for the subscription has reached the maximum threshold that is allowed. Please try again after 2/11/2015 5:15:57 AM. Activity Id 9c4fface-5b2b-498d-b3c5-53eb98caead7) Url(HTTP Request)

On this test run, it caused about 60% of our requests to fail.

Screen Shot 2015-02-11 at 12.47.09 AM

2015-02-11
Previous Post: Redline13 support for splitting input files
Next Post: JMeter Cloud testing your DB

Recent Posts

  • Guest Post – IoT Load Testing
  • Load Testing Users in India
  • Load Testing in India
  • Troubleshooting Common Issues with Selenium Tests on RedLine13
  • Extracting Metadata from Load Generator Instances

Related

  • Load Testing Users in India
  • Guest Post – IoT Load Testing
  • Guest Post: Load Testing with Locust and JMeter on RedLine13
  • Run Your RedLine13 Load Tests from Hyderabad, Jakarta and Melbourne
  • Load Testing in India
  • Selenium Basics for Load Testing
  • Pitfalls of Selenium Load Testing
  • Troubleshooting Common Issues with Selenium Tests on RedLine13
  • Extracting Metadata from Load Generator Instances
  • Case Study: iCIMS, The Talent Acquisition Software Experts

© RedLine13, LLC | Privacy Policy | Contract
Contact Us: info@redline13.com

Designed using Responsive Brix. Powered by WordPress.