BlazeMeter, continuous testing platform, is a perfect solution for your performance needs. BlazeMeter is an open-source tool that supports Web, Mobile and API implementations. You can perform large scale load and performance testing with the ability to tweak parameters to suit your needs.
We will learn step by step process on using BlazeMeter for API testing.
Register for BlazeMeter
Enter your information on the BlazeMeter site to register and get started
Configure Your First Scenario
The first time you login, you will be taken to default view of BlazeMeter with default workspace and project. Let us start configuring a new scenario.
Create a New Project
Select Projects -> Create new project
Name project
Select Create Test
Select Performance Test
Now you are taken to configuration tab
Â
Update Your Scenario
The left section here has your test specifications
Tap on Edit link and start updating your project name, let it be “FirstLoadTestâ€
You can define scenario and test data in Scenario Definition section
For this Demo we will configure API endPoint, tap on Enter URL/API calls (see picture below)
In Scenario Definition enter “https://api.demoblaze.com/entries“. So we are load testing this endpoint with GET call
Lets Name this scenario “DemoWithoutParametersâ€
Tap on three dots next to Scenario definition and duplicate the scenario
Name this as “DemoWithParametersâ€
Create TestData
Next to Scenario Definition we have TestData section, tap on it
You can choose from options available, for this demo we will go with “Create New Data Entityâ€
Lets name it “DemoTestData†and Add it
Tap on + icon next to entity created for parameterization options
In this example we will select New CSV File
You will be taken to a data table. Rename “variableName1†to “Parameter1†and “variableName2†to “Parameter2″(our variable names are “Parameter1†and “Parameterâ€)
Enter values as “Value1†and “Value2†and Save
Configure these parameters in Query Parameters section (See picture below)
Now we have successfully completed building a scenario with two endpoints, you can configure one or more endpoints in one scenario
Configure Your First Test Run
Scroll down the scenario definition window to see Load Configuration section
Enter Total Users, Duration, Ramp up Time. For now we can just test with 2 users, Duration: 1minute, RampupTime: 0
Once you update these details observe the graphical representation of how your Load Test is going to be in the graph displayed in this section.
We can also limit Requests Per Second(RPS) by enabling the toggle button for “Limit RPS†and select requests you need to limit per second
We can also change number of users at run time, but this is available with only Enterprise Plan.
Lets configure LoadDistribution now in “Load Distribution†section which is right below the “Load Configuration†section
Select the location from where you need the requests to trigger.
We can select multiple locations and distribute load across different locations, but again this feature is available with only enterprise plan
For now, lets proceed by selecting one location
Failure Criteria
Failure Criteria is the best approach to immediately know your LoadTest Results
Do you have your failure criteria defined? If yes, you can configure that in this section. This is optional, you can skip if you don’t have failure criteria defined.
You can configure multiple failure criteria as well
Enable “1-min slide window eval†for evaluating your loudest prior to execution
Select “Stop Test?†checkbox if you want to stop the execution in case of failure
Select “Ignore failure criteria during rampup†to ignore the failures during ramp-ups
You can add one or more failure criteria and select this option uniquely for each criteria
Select the option “Enable 1-min slide window eval for all†on top right of this section to enable for all provided failure criteria
Test Your Scenario
Run your scenario by clicking on “RunTestâ€
Wait for launch Test window to load completely
Now click on “Launch Servers†button
Click on “Abort Test†to abort your execution any time
Observe your execution go through different stages (Pending, Booting, Downloading and Ready)
Once it reaches Ready you can see your execution progress
Once the execution is done you can view the summary with status as passed/failed
Analyze Your LoadTest Results
The important part of performance test is to analyze your KPIs
You can see different KPIs in test results summary
To understand more navigate to “Timeline Report†section, bottom left you can see “KPI Panelâ€,this panel contains different KPIS.These KPIs can be analyzed as required
By default it provides generalized view, you can select single endpoint to analyze KPIs for one particular endpoint
Schedule Your Load Tests
BlazeMeter is continuous Integration tool, you can schedule your executions and view results when required
Select your test from Tests Menu on top
On to left of project description window you can find SCHEDULE section
Tap on Add button next to it Schedule to see schedule window
Configure the scheduler with required timings and Save the scheduler
The new scheduler will be added to your project
Delete it by tapping on Delete icon
You can add multiple schedulers
Toggle on/off to activate/deactivate the schedulers
BlazeMeter Pros/Cons
ProsCons
Open sourceRequires a license for additional features and support
Provides Scriptless performance testingTest results analysis requires expertise
Integration with Selenium, JMeter, Gatling, LocustNeed to integrate with Selenium/JMeter to test functional scenarios
User-friendly UI
Report Monitoring from any geographic location
Integrates with CI/CD pipelines
If you are looking for a tool that services your performance needs, BlazeMeter is your best option. You can generate scripts with its scriptless UI, simulate loads and run your tests. You can also simulate the spinning up servers, script runs and results generated within seconds.
For more information about Perficient’s Mobile Solutions expertise, subscribe to our blog or contact our Mobile Solutions team today!
Source: Read MoreÂ