BlazeMeter Test Types and When to Use Them
Once upon a time, in the early days of a young BlazeMeter, all the focus was on performance testing. Software testing has evolved quite a bit since then, though, and BlazeMeter has evolved along with it, expanding to a full toolbox to help you along your entire continuous testing journey.
If you’ve been using BlazeMeter since the beginning, you may have overlooked some of the new types of tests available to you. If you’re entirely new to BlazeMeter, all of the various options can be a bit overwhelming. Which type of test do you use when?
Today we’ll explore all of the test types BlazeMeter offers and cover the basics of how they different from each other and what kinds of situations each type fits best, and we’ll also introduce each type in the typical order that one would usually engage them within the continuous testing lifecycle.
Functional testing is usually the very first type of test developed during the software development lifecycle, and thus it typically marks the entry point into the continuous testing lifecycle. These are simply tests that verify if the application works as designed. Naturally, you want to make sure your application works before you can test how well it performs in various situations. These tests aim to poke and prod the various features of an application to look for anything that may be misbehaving.
API Functional Testing
There are several types of functional tests you can create in BlazeMeter. The simplest and probably most common type of functional test is an API Functional Test. This type of test is built by configuring a series of API calls to test your application’s backend -- nothing too terribly complicated. Simply place various types of API calls to your application’s API endpoints then run the test to verify that your application responds as you intend it to. These can be very simple, basic tests, but you can add quite a bit of complexity by customizing the parameters of payloads sent by each API call.
By the way, if you’re new to this corner of BlazeMeter, you may find it easy to confuse API Functional Tests with API Monitoring Tests. The two are actually very different. Keep reading -- we’ll address the latter type in a bit.
GUI Functional Testing
GUI Functional Tests can be a bit more complex than their API test cousins. These types of tests are most commonly developed using Selenium and aim to test the application’s frontend. As a functional test, the goal is still to verify the application simply works, but this time you’re focused on testing what it’s like to be a user clicking around and typing within the application via a web browser.
If you’re never run a GUI test with Selenium before, they can be pretty cool to watch. As your script executes, you’ll see your browser of choice open on-screen and your mouse start magically moving on its own (unless you run the script headless).
By the way, GUI tests aren’t just for professional code ninjas -- BlazeMeter grants you the ability to write a scriptless test that requires no scripting expertise whatsoever.
Mock Services often go hand-in-hand with functional testing. Once you’ve established that your application server is functioning as intended, you may want to do some additional testing without it. “What madness is this?” I hear you ask, but the general idea is this: You may want to try testing some ideas out without worrying about consuming actual application resources. When that’s the case you can simulate -- or mock -- a web service so that you can test various scenarios against it.
It’s a bit of an abstract concept and no doubt a bit hard to wrap the mind around if you’re a new tester, but it can be extremely handy. You are essentially configuring tests that send messages to and receive responses from a BlazeMeter service that is pretending to be your application, behaving and responding just as your application would, were it actually there. This lets you test all sorts of scenarios without needing your application server to actually be present for the tests, which can spare you some resource usage.
Performance tests were at one time BlazeMeter’s bread and butter, in the days before it expanded to include additional test types. After your functional testing verifies that your application is indeed functioning as expected, performance testing takes it up a level by next testing how your application functions when put under a load. (While we’re on this topic, take a moment to learn the 7 Reasons to Run BlazeMeter Performance Tests -- It’s a great introduction.)
Performance testing is often all about load or testing (in fact, we have an entire guide on why Load Testing is Important), but there’s a number of approaches to take, depending on exactly where your current focus is. Check out our guide on Performance Testing vs. Load Testing vs. Stress Testing for a deeper dive into your options. In other words, BlazeMeter provides a performance testing tool that you then configure to your particular needs, be it in the form of a load test or stress test or something else.
This is where you scale up your test to run across multiple engines and even from multiple locations around the world, if you like. If you need to simulate thousands or tens of thousands (or more) of users slamming your site during a big event, this is the way to do it.
After you have run your web application through all the gamut of tests needed to ensure reliable functionality and performance, you’re finally ready to go live and share your now-very-reliable service with the world. When we’re thinking in terms of continuous testing, the work does not at all end here; rather, the testing carries on!
API Monitoring is a type of ongoing testing tool that ensures your now-live service stays live. If any unforeseen issues arise, such as a server or network outage, BlazeMeter’s API Monitoring will immediately catch it and alert you so you can respond the moment trouble appears.
If you’re new to the feature, you may find yourself asking “what’s the difference between API Functional Testing and API Monitoring?” The answer basically boils down to when each comes into play. Both are API tests, but they (typically) occur at different points in the development lifecycle. API Functional Testing, as discussed above, usually occurs toward the beginning of the lifecycle. It tests that your new application works. API Monitoring, on the other hand, usually occurs toward the end, once your application is live. It continually tests that your live, production application continues working.
Don’t just take my word for it, though -- BlazeMeter’s own Lukas Rosenstock explains the difference in full detail in his API Testing and API Monitoring: The Complete Guide.
That’s the general rule anyway, and how we recommend approaching it if you’re a newcomer, but on the other hand, we encourage thinking outside the box, and some advanced BlazeMeter users will find other uses for these features well beyond what we’ve prescribed to this point. For example, it is possible, if you are so inclined, to configure an API Monitoring test to act as a functional test. That is, of course, a bit beyond the scope of our intro-level discussion today.
Conclusion: Just the Basics
This has been a brief high-level summary of what all types of tests BlazeMeter offers and when you might want to employ them, but there is so much more to be said. As you advance in your BlazeMeter knowledge, there is much, much more you can explore with each and every test type, and each type has a wide range of options so that you can create everything from very basic tests to very, very complex tests with many moving parts.
Continue reading the various topics of this blog and the BlazeMeter guide as you continue your testing journey, and you’ll find there’s virtually no end to what you can learn to do next with it. Ready to get started with BlazeMeter? Sign up here.