I think that it's commonly accepted at this point that performance testing in software is a useful way of giving us confidence in the robustness and responsiveness of our system under load. The arguments covering these ideas are well covered by better domain experts than myself, so this article will focus on the practicalities of integrating performance testing with your CI environment.
This article assumes familiarity with the following tools
- JMeter - Widely used and highly adaptable performance testing tool.
- Jenkins - Highly popular continuous integration server.
- Maven - Build and dependency management tool.
It's out of scope for this article to introduce, in detail, these tools, but there are a number of online articles that are better suited to providing a better grounding should you be interested.
Objectives of a well designed performance testing system
A well designed performance testing system should satisfy some of the following high level properties.- Have well designed tests. Often, it's understated how important having well written parameterized tests can be, so i'll dedicate a small section of the article to explaining how you can use some of the often overlooked features in JMeter to improve your own tests.
- Support scalable generation of load. Ideally we don't want to rely on one machine to generate all the load for the performance tests. Doing so will push you into a situation where you might find yourself unneccessarily limited by network congestion and physical resource contention.
- Provide effective reporting facilities. We need to be able to analyze the results of our tests to determine whether any areas of the system haven't performed the way we expect.
Luckily, the tools to satisfy these goals already exist, its just a case of putting them together.
Tips and tricks for your JMeter tests
Ok, lets dive right in. I'm going to try and make this very example centric so you can see whats going on hopefully in the context of your own jmeter tests.
The thread group is one of the simplest and most powerful ways of simulating a user in your system. Requirements from the business are often expressed in these terms over the classic request per second metric. Thus, it can be a pragmatic approach to model the test in these terms.
Looking at the entries for the Thread Properties gives us a first look at JMeters often overlooked variable dsl, documented here. Lets take the first field as an example :
${__P(users,100)}
So what this statement is trying to do is resolve the value for the users property. If it can't it will use the provided default (100).
Pitfall 1 : Theres some weird truncation logic in play here through the ui ( which i'm assuming 90% of people will be using to edit these fields ), so make sure you check your field names.
The Thread Group ( Simulating Users )
The thread group is one of the simplest and most powerful ways of simulating a user in your system. Requirements from the business are often expressed in these terms over the classic request per second metric. Thus, it can be a pragmatic approach to model the test in these terms.
Looking at the entries for the Thread Properties gives us a first look at JMeters often overlooked variable dsl, documented here. Lets take the first field as an example :
${__P(users,100)}
So what this statement is trying to do is resolve the value for the users property. If it can't it will use the provided default (100).
Pitfall 1 : Theres some weird truncation logic in play here through the ui ( which i'm assuming 90% of people will be using to edit these fields ), so make sure you check your field names.
Http Request Defaults
So two important factors here about making your test plans generally more maintainable and more robust.
- Configurable domain - We set a default here so we can change the environment which we run our tests against.
- Timeouts - This is a common pitfall. If you don't set your timeout you could potentially be in a situation where your test hangs forever.
Pitfall 2 : Always set a timeout on http requests.
Maven Integration (Lazerycode Plugin)
Now we have some tests we need to start thinking about how to run them outside the JMeter GUI. Thankfully, a decent maven plugin exists provided by Lazerycode.
So lets assume that you've created a simple maven project in which to put your jmeter test files, properties file and plugin configuration. Lets review what you should probably have in there.
pom.xml
I've provided some elaboration on the configuration options below:
- ignoreResultFailures - If a single sampler request fails, you dont want to kill the whole test. We want to collect and display this information in the reporting phase and then make assertions at that point.
- remoteConfig - Adding the remote config section will tell the plugin to send the test plan to your distributed nodes and collect the results.
- java.rmi.server.hostname - This will inform the remote nodes where to send results, which can help you avoid a lot of the network configuration problems you might have otherwise when running the test across multiple subnets.
- propertiesGlobal - Remember all those properties we were making configurable earlier? Heres where the integration comes in. The env.foo syntax is used because thats how variables will be passed from jenkins to the maven plugin.
Next, we need to specify a couple of additional properties. Another quick look at the documentation will tell you that the plugin also checks the src/test/jmeter dir for a set of properties files. We want to, at this point, create a jmeter.properties file and populate it with the following values :
remote_hosts=test-server-1.nerdability.com,test-server-2.nerdability.com,test-server-3.nerdability.com
Obviously using your own remote nodes for in place of the defaults i've specified here.
Thats it. Your plugin is now configured to orchestrate execution of your test plans. Onto reporting.
Reporting with Jenkins Performance Plugin
Now go ahead and install the Jenkins performance plugin, which will be responsible for producing pretty graphs from our test reports. After installing, set up a job which runs mvn verify on your project ( this will run the performance tests ). Next add the post build action Publish Performance test result report. It should look like this :
Finally, remember all those variables we added in the tests earlier? Now we want to add those as parameters to the job so we can configure them when we run the job.
These will be provided to the build under the env namespace.
That's pretty much it, tweak and improve the performance tests and configuration as you see fit. The framework should support whatever you need to do.
What an Amazing post , really appreciate..
ReplyDeleteHi,you sharing to lot of useful information...This information is very popular to all sites....Wonderful..hadoop training chennai
ReplyDeleteThanks for sharing the useful information on the blog.
ReplyDeleteBesant Technologies Reviews Complaints Testimonials
Thanks for sharing such informative blog.
ReplyDeleteSelenium Training in Chennai
Best provides Salesforce Training in Chennai with years of experienced professionals. Today's most of the IT industry use this software for Saelsforce Training. To know more details about salesforce reach Training in Chennai
ReplyDeleteHi, this is Ganesh I am having 3 years of experience as a Dot Net developer and I am certified. I have Knowledge on OOPS Concepts in .NET indepth. After learning Salesforce will be enough to get a good career in IT with good Package? and i crossed Salesforce Training in Chennai website where someone please help me to identify the syllabus covers everything or not??
ReplyDeleteThanks, Ganesh
Hello,
ReplyDeleteMuch obliged to you for the aide.In addition,I can suggest another,how to integrate JMeter tests into building process: install Jenkins/(ex-Hudson);download Jenkins plugin,register to performance testing cloud and upload JMeter script,start build – your test will be begun automatically in the cloud.The primary advantage of utilizing this cloud is that it is conceivable to configure test with up to 80000 clients in 5-10 minutes.
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@
hidden objects games
Thanks You. Best Salesforce Training in Chennai
ReplyDeleteShare this links for Freshers in Sales force Best Salesforce Training in Chennai
ReplyDeleteI have read your blog and i got a very useful and knowledgeable information from your blog.its really a very nice article.You have done a great job . If anyone want to get Salesforce Course in Chennai, Please visit FITA academy located at Chennai Velachery.
ReplyDeleteI have read your blog and i got a very useful and knowledgeable information from your blog.its really a very nice article. I did Loadrunner Course in Chennai. This is really useful for me. Suppose if anyone interested to learn Manual Testing Course in Chennai reach FITA academy located at Chennai Velachery.
ReplyDeleteHi, I wish to be a regular contributor of your blog. I have read your blog. Your information is really useful for beginner. I did Selenium Course in Chennai at Fita training and placement academy which offer best Software Testing Course in Chennai with years of experienced professionals. This is really useful for me to make a bright career.
ReplyDeleteJava Training
ReplyDeleteHi I am Johnson lives in Chennai. I am a technology freak. Recently I did Java Course in Chennai at a leading Java Training Institutes in Chennai. This is really helpful for me to make a bright career in IT industry.
Java Training in Chennai
Thanks this is the useful blog.I can able to understand about the jmeter basic and why we are studying the jmeter.Software Testing Training in Chennai
ReplyDeleteThe future of software testing is on positive note. It offers huge career prospects for talented professionals to be skilled software testers. Automation training in Chennai | Software training | Software testing training institute Chennai
ReplyDeleteJMeter tricks are really very useful
ReplyDeleteLoadrunner Training in Chennai | QTP Training in Chennai | Selenium Training in Chennai
Its nice blog with lot of information keep doing it ....
ReplyDeletedot net training in chennai | salesforce training in chennai | cloud computing training in chennai
Thats amazing blog... especially the information about the testing performance is nice
ReplyDeletedot net training in chennai | salesforce training in chennai | cloud computing training in chennai
Expectation on testing is high because every code must be debug using this..
ReplyDeletedot net training in chennai | salesforce training in chennai
Distrubuted performance testing is new know of testing.its really helpful
ReplyDeleteLoadrunner Training in Chennai | Software Testing Training in Chennai | QTP Training in Chennai
SAP Enterprise Service Oriented Architectonics (or Enterprise SOA) has been authentic by SAP SE as "an accessible architectonics for adaptive business solutions" and "the adapt for an architectonics that enables addition and acclimation in a distinct environment".
ReplyDeleteSap training in chennai | Sucess factor training in chennai | Sap training in chennai
ReplyDeleteI have read your blog it was nice to follow even I am looking for your future updates. Hadoop is a highly growing & scoopful technology in IT market it’s an open-source software framework for managing big data in a distributed fashion on large commodity computing hardware.
Hadoop training in chennai | Hadoop courses in Chennai | Hadoop institutes in Chennai
SAP Training
ReplyDeleteThanks for sharing this valuable information.and I gathered some information from this blog. I did SAP Training in Chennai, at FITA Academy which offer best SAP Course Chennai with years of experienced professionals.
Excellent article!!! LoadRunner is popular automation testing tool used for validating a software application/system under load. It delivers most precise information about the performance, functionality and behavior of the software product. Loadrunner training in Chennai | Loadrunner training
ReplyDeleteThanks for your wonderful post.It is really very helpful for us and I have gathered some important information from this blog.If anyone wants to get Dot Net Training in Chennai reach FITA, rated as No.1 Dot Net Training Institutes in Chennai.
ReplyDeleteI am following your blog from the beginning, it was so distinct & I had a chance to collect conglomeration of information that helps me a lot to improvise myself. I hope this will help many readers who are in need of this vital piece of information. Thanks for sharing & keep your blog updated.
ReplyDeleteDOT NET Training in Chennai | DOT NET Training Institutes in Chennai
HI Michael,
ReplyDeleteValid information you have shared in this post, really appreciable one...
Thanks,
Web design training in Chennai
Hi, I wish to be a regular contributor of your blog. I have read your blog. Your information is really useful for us. I did Software Testing Course in Chennai at Fita training and placement academy which offer best Software Testing Training with years of experienced professionals. This is really useful for me to make a bright career.
ReplyDeleteThanks for sharing this informative blog. I have read your blog, your information is really nice and useful for sap beginners. I have completed sap certification course at a leading IT academy. This is really useful for me to make a wonderful career. If anyone wants to get SAP Training Chennai visit FITA Academy.
ReplyDeleteAmazing post . thanks for your knowledge sharing . keep posting like this kind of activities .
ReplyDeletebest data warehousing traning in chennai
Amazing post . thanks for your knowledge sharing .
ReplyDeletejava training in chennai
Amazing post . thanks for your knowledge sharing .
ReplyDeleteoracle apps training in chennai
Thanks for your wonderful post.
ReplyDeleteinformatica training in chennai
• thank s for sharing the wonderful content with us.it helps us to know more shuttle services for their education services.
ReplyDeletesoapui training in chennai
Best Oracle Performance Tuning Training in Chennai.Performance Tuning Training In Chennai
ReplyDeleteGreat Post with lots of useful information. Special thanks for this blog highly useful..
ReplyDeleteSAP Training in Chennai | SAP ABAP Training in Chennai | SAP FICO Training in Chennai | SAP MM Training in Chennai
This is the exact information I am been searching for, Thanks for sharing the required infos with the clear update and required points. To appreciate this I like to share some useful information.SAP FICO training in bangalore
ReplyDeleteGOOD
ReplyDeleteiot training in chennai
internship for mca students in chennai
internships for cse 3rd year students in hyderabad
information technology projects list 2018
ethical hacking course in chennai
ece internships in bangalore
internship for computer science students
internships in chennai for cse students
internship in chennai for cse 2019
internship for ece students in bangalore
Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
ReplyDeletesap hana courses in bangalore
sap hana classes in bangalore
sap hana training institute in bangalore
sap hana course syllabus
best sap hana training
sap hana training centers
best sap hana training
Thanks for sharing such an useful and informative stuff...
ReplyDeletesalesforce developer course
salesforce tutorials
Cloud computing is the best technology that every top company in this world are using for their computing purpose. This article provides the information that is more relevant to it. Thanks for sharing this valuable information in here. By the way you are running a great blog here. Keep up this good work.
ReplyDeleteCloud computing is the best technology that every top company in this world are using for their computing purpose. This article provides the information that is more relevant to it. Thanks for sharing this valuable information in here. By the way you are running a great blog here. Keep up this good work. good jobs.
Ai & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai
This is excellent information. It is amazing and wonderful to visit your site.
ReplyDeleteCyber Security Training Course in Chennai | Certification | Cyber Security Online Training Course | Ethical Hacking Training Course in Chennai | Certification | Ethical Hacking Online Training Course |
CCNA Training Course in Chennai | Certification | CCNA Online Training Course | RPA Robotic Process Automation Training Course in Chennai | Certification | RPA Training Course Chennai | SEO Training in Chennai | Certification | SEO Online Training Course
cloudkeeda
ReplyDeletewhat is microsoft azure
azure free tier account
azure adf
adf interview questions
azure certifications
Jenkins Interview Questions and Answers
ReplyDeleteDistributed Performance Testing with Maven JMeter and Jenkins is a game-changer for optimizing Bill Check Online efficiency. Streamlining tests ensures seamless operations and enhances user experience. A must-try solution!
ReplyDelete