API Performance Testing with LoadUI Pro: The Why, the How, and the Measures of Success [Part 2]
Test and Monitor | Posted Juni 16, 2020

This post is part of a series on API performance testing. Other posts in this series are as follows:

Part 1
Part 3

Whether you’re developing an API to power other applications, or building an API within your own corporate infrastructure, you need to establish a reliable testing process. That means using the right tool to understand any vulnerabilities in your API so you can prevent issues or prepare for failure scenarios.

Fortunately, with LoadUI Pro, load testing does not have to add a significant amount of bandwidth to your API testing workload. The tool lets you reuse functional test scripts with just a few clicks of a mouse, allowing you to seamlessly add load testing to your existing functional testing process. So let’s take a look at some best practices, and how LoadUI Pro can speed up not only your application, but your performance testing procedures.

Working in Parallel With Development

You’ve heard it before. “Software development has become more Agile.” “Testing has shifted left.” The truth of the matter is that while functional testing tools and processes have evolved to accommodate agility, performance testing is still a monolithic and centralized function. This outdated methodology is primarily driven by a marketplace that hasn’t created tooling to allow for a more Agile workflow. However, the shift in functional testing is an opportunity to introduce performance testing scenarios earlier in your testing process.

Here are four handy suggestions for developing an Agile load testing process.

1. Incremental API Testing

Incremental API testing starts at the lowest functional levels. Test a small function and then build from there. If all of the individual components function and perform correctly, chances are they’ll work together, which helps identify and debug bottlenecks in the future. From there, you can introduce performance testing by breaking it down into smaller tasks, earlier in the development process.

2. Establish Performance Goals

It’s important to set performance goals when writing user stories. For example, if you’re creating an API for an e-commerce site, you’ll want to include the functionality to add items to a cart. This task should take no more than half a second. If you clearly define your performance expectations, you’ll have a more clearly defined testing process.

3. Include API performance tests in the build process

Include load tests in the built process so that each build goes through some level of performance testing. By doing this, you’ll be able to determine what caused the slowdown in an application’s performance. Also, if you need to roll back to an earlier build, you know how well that particular build performs.

4. Reuse functional tests

Reusing functional tests whenever possible is one of the key anchors for Agile performance testing. So always check if you can reuse existing or future API functional tests as performance tests. It may even be possible to incorporate timers into an automated test to give you a feel for how the application is responding. Review your functional tests with a designated performance expert and make the decision as to what can and can’t be reused. Or better yet, utilize LoadUI Pro. Let’s dive deeper below.

Improving the Efficiency of Performance Tests by Reusing Functional Tests

When asked to provide the factors that are most important when evaluating an API testing tool, we found that teams want tools that easily integrate with existing systems and are easy to use. They also want tools that improve efficiency by re-using tests, scripts, and resources. By reusing functional tests for performance testing you can:

  • Test the speed and scalability of new changes to your APIs in minutes, not days
  • Preview API performance behaviors before releasing to production environments
  • Shift performance insights left so developers build more reliable code

When starting a new project with LoadUI Pro, you can select a template that will allow you to configure a load test. The templates are based on popular load testing scenarios and provide basic settings that fit these scenarios.

From there, the “Create Load Test” wizard will open and auto-populate with your functional test scripts from SoapUI. Below, we have a Google maps API test we previously ran, and we’ll select that for our stress test.

From there you simply follow the wizard and run your test with the default parameters.

It’s really as simple as selecting a template, selecting a previously used test from SoapUI, and hitting execute.

Now that you’ve seen how easy it is to reuse functional tests as load tests for your API, we can determine the right scenarios to test and reports to produce. We’ll cover all of that in our third and final installment of our performance testing blog series.

Till then – Happy Testing

Close

By submitting this form, you agree to our
Terms of Use and Privacy Policy

Thanks for Subscribing

Keep an eye on your inbox for more great content.

Continue Reading

Add a little SmartBear to your life

Stay on top of your Software game with the latest developer tips, best practices and news, delivered straight to your inbox