Wednesday, June 10, 2015

How JMeter becomes more powerful when used with BlazeMeter

Backend-Based Functional Testing Using JMeter

Software testing and development has undergone a lot of evolution in recent times.
Functional testing was done locally and software used to run without any sort of external connectivity. Then came the nineties and software testing was started being done on internet-based applications like browsers. Fast forward a couple of decades and smartphones, tablets, the IoT and wearables have changed the way applications are used. Nowadays, functionality often lays within an application’s backend houses the functionality while the frontend is concerned mainly about how the data is presented within the boundaries of user experience. Naturally, this has also changed the way these modern applications are tested for their functionality.
Functional Testing Using JMeter
JMeter was initially built to provide an open source solution for performance and load testing. But JMeter can be used for performing backend-based functionality tests too. For instance: with JMeter, a part of your user registration functionality can be tested by testing the APIs of your system and by making sure that the users are created successfully in your database. You can utilize JMeter for creating an API call with various user names and passwords, instead of opening a browser and entering random data in the given fields manually.
The supported protocols by JMeter are the following:
·         Web: HTTPS web sites web 2.0 (flex-ws-amf, flex and ajar), web 1.0, HTTP
·         Web Services: XML-RPC or SOAP
·         Database through JDBC drivers
·         Directory: LDAP
·         JMS (Messaging Oriented service)
·         Service: SMTP, IMAP, POP3,
·         FTP Service
·         JDBC
·         Hadoop (and Kafka with Kafkameter Plugin)
·         UDP services
RESTful APIs normally make use of the POST, GET or PUT technique of HTTP requests, and create properties files with POST requests or JSON files which represent the data that is to be moved over. JMeter makes functional testing quite easy by utilizing a dedicated HTTPS or HTTP sampler. The data in a tested application can be used to create a request sample- and then an external file is utilized to provide the various parameters that you would want to test.
Assertions can also be used to configure functional testing in JMeter. The assertions identify if any API sent a reply, indicating whether a process failed or the desired data was received. For instance: during the testing of user registration, a reply would indicate if a user ID was created or not.
Java unit testing can also be performed using JMeter with Junit. JMeter has a native support for JUnit, and can be included in the whole functional testing strategy. Any Junit tests that were created while developing the software can also be included in the testing. JUnit tests can be utilized along with API calls.
Testing User Experience
The verification of the user experience and the backend functionality is very essential. JMeter cannot be used to test the user experience. Solutions like SauceLabs and Perfecto Mobile offer frontend testing tools for testing the user experience.
For verifying backend as well as frontend functionality, you can use SauceLabs to run Selenium-based tests on browsers and operating systems.
The Perfecto Mobile environment allows you to run functional tests on mobile devices supporting native apps as well as browser.
Full Functionality Testing of Your App
Your testing armory should be ideally equipped with a suite of tools to test the full functionality of your application. Both frontend and backend functionality tests should be carried out to cover all the bases, as both the tests complement each other.
JMeter is a true winner as it was developed originally for load testing as an open source tool, but it readily adapted to the changes in the functionality testing. The same samplers and plugins that were used to produce loads can be used by the developers for functional testing. This, along with the integration of various frontend tools, provides an end-to-end environment ensuring the functionality of your application.


Load testing is an important step when we are working with web applications and SAAS based applications. Then, there comes question of how to do load testing: setting up own lab or using cloud based testing service. Load Testing process involves setting up the test bed, writing automated scripts, continuous maintenance and monitoring the infrastructure which becomes very tedious. There are obviously multiple profits of using cloud for load testing. I am listing down a few benefits of cloud based services:
·         Cost benefits: You save huge money by not buying infrastructure
·         Time: It’s the responsibility of service provider to maintain the software so, your time is saved
·         Flexibility: You can run your tests from anywhere just an internet connection is needed
·         Meeting deadlines: As the infrastructure can’t have a breakdown, cloud-services don’t hinder your work schedules and you can stick to deadlines
·         Excellent service: The service benefits are much greater than your in-house IT department
·         Team efforts saved: Your much knowledgeable technical team doesn’t have to work hours to setup and maintain test setup and they can spend efforts mainly on testing and reports
·         Real Load benefits: The main feature of cloud based services is that you get realistic load depicting live scenarios
·         Continuous Customer Support: You can rely on this third party to help you anytime you have a question and you can continue your  performance testing as long as you need

When it comes to testing applications on cloud and making them scalable, load testing for 50K users becomes a challenge. Here comes the role of SAAS based load testing tool: BlazeMeter, which is highly scalable and can handle load of more than 300K users. BlazeMeter is actually “JMeter in the Cloud”.

Advantages of BlazeMeter:

JMeter compatibility
JMeter being open-source tool is always foremost choice for load testing in any project. It is the most common tool and recommended for its stability and performance. And Blazemeter provides 100% compatibility with JMeter scripts and also addresses limitations of JMeter. Older version of JMeter scripts can be reused with Blazemeter which saves huge efforts
Various Plugins
1. Blazemeter can also work with Chrome and can record browser actions & convert it to .jmx file.
2. BlazeMeter obtains the last 12 months of data from Google analytics and creates a test automatically for five mostly visited pages and based on this record it can set number of concurrent users too
3. WordPress users can test their App by using BlazeMeter plug-in without the need of scripting
Real Load availability
For an effective and meaningful when load comes from all type of sources. When emulators are used and virtual load is created from same IP, it sometimes provides unrealistic results. BlazeMeter can provide load from multiple IP’s which is vital for load testing the cloud applications.
Network Emulator: Blazemeter has option to customize various network types (3G, wifi, broadband etc.) and their bandwidth (download limit etc)
Flexibility of controlling agents
JMeter uses Master-Agent based architecture and Master controls multiple agents which generate load. Number of agents is a predefined parameter before running the test. But, with Blazemeter number of agents can be changed dynamically while running the tests and any instance can be used as Master or Agent while the test run
Live Server Monitoring for Throughput
JMeter requirement is to set the Target throughput parameter and application’s performance is compared to this threshold. But, Blazemeter provides the option to set runtime value for this parameter according to application’s performance. So, server can be monitored at various levels while running the test
Automatic Controlling of Agents
Load test strategy requires to determine parameters like ramp up time , number of concurrent users, test engines, test iterations and the test duration. In JMeter These values are configured before the test is started. The maintenance of EC2 instances has to be provisioned for the Agents, the master and slaves IP addresses has to be configured manually. Load Testers are expected to maintain, manage and monitor whole setup during the test cycles. But, it will be very tedious to maintain such setup for EC2 load where 50K + requests are needed. BlazeMeter automatically sets number of test engines, number of threads and engine capacity based on the number of concurrent users. And all this is customizable. The efforts of team are saved tremendously and they can concentrate on testing
CSV as per load test engine
Blazemeter allows different csv file per load test engine. In JMeter its all manual. Blazemeter keeps a common repository for all files which can be referred to each without manually copying
Scheduling and autotest
BlazeMeter as well as JMeter allow scheduling test start time and their duration which can be run anytime. Blazemeter allows weekly fixed schedules to be set too


With so many benefits, Blazemeter obviously has a bright future!!

No comments:

Post a Comment