Book Review: Apache JMeter
MassDosage writes "Apache JMeter written by Emily H. Halili is very much an introductory guide to using Apache's open source JMeter testing tool. Unfortunately a book that should have been good fodder to whet the appetites of testers is spoiled by shoddy editing, poor writing and very little content that isn't already included in JMeter's own user manual." Read below for the rest of MassDosage's review.
Apache JMeter
author
Emily H.Halili
pages
129
publisher
Packt Publishing
rating
3/10
reviewer
Mass Dosage
ISBN
978-1-847192-95-0
summary
A practical beginner's guide to automated testing and performance measurement for your websites.
I am one of those (fairly) rare software developers with a genuine interest in testing and first tried using JMeter many years ago after its initial release as a tool primarily focused on testing the Apache Tomcat web/application server. It was a bit rough around the edges and poorly documented in those days so I was looking forward to a book that would re-familiarize me with JMeter in its current form. This book clearly targets itself at the testing community and doesn't require any programming (or even much testing) knowledge.
Apache JMeter starts off with a not particularly convincing overview of why one would want to automate testing and goes off on a tangent trying to prove the monetary savings this leads too. Any testing will depend very much on the type of software being tested, the skills of the tester, technology stack in use etc. so trying to come up with a general formula proving that testing will save money is probably impossible and pointless. It would have been far more useful to include some practical examples where testing saved time, effort, caught bugs early etc. A very brief history of JMeter is provided as well as an overview of its GUI and the the various elements available. For those who haven't used it before — JMeter acts as a client which sends requests to the application being tested and can then act on the responses returned. Overall this isn't the smoothest of introductions with lots of grammatical errors, fragmented text and repeated concepts, which doesn't bode well for the rest of the book.
Installing and setting up JMeter is covered next and this is straightforward and simple. A good overview of what a JMeter test plan consists of is provided and this covers controlling how many simultaneous users a test will use, what logic and timing will be used to issue requests, the type of requests (e.g. HTTP for web sites, FTP for file retrieval etc.), various configuration options, how to assert the contents of responses and so on. The book is a bit dated and the version of JMeter I was using didn't always match up with the text and diagrams but most of the differences were self explanatory so this wasn't really an issue.
The chapter on load and performance testing is the best on offer and provides sensible guidelines on this type of testing. These include tips such as ensuring network bandwidth between the machines under test, running the tests on physically separate machines from the software being tested, running tests for long periods of time and what to monitor. This is mainly common sense but it's good to see them summarized and the book would have benefited from more sections that appear to be informed by the author's practical experiences as a tester. The example given in the book is the load testing of a web site over HTTP and it's left up to the reader to translate the various types of request being made to an example website of their own. The screen shots of setting the various GUI values are clear and useful. Remote testing (i.e. not using a single JMeter GUI but multiple command-line instances of JMeter) is mentioned but sadly not covered which is a shame as any serious load or stress testing usually requires this. Using JMeter as a proxy to quickly generate a test plan by recording HTTP requests from a browser is both neat and useful and explained well.
JMeter is not just limited to load testing but can also be used to do simple functional tests as it can inspect the values returned by requests and perform assertions on these responses (e.g. checking that the returned HTML contains some text). Unfortunately functional testing is covered very poorly with far too little detail and no explanation of how to run the examples yourself. The author should have stuck to one simple use case (ideally that the reader could follow along with) which would show how to add one's own custom values to requests and to assert the results returned. In the end I could figure it out for myself, but I'd expect a book to guide me through this.
Advanced features are up next and the reader is pointed towards the sample code included with the book (a .rar file inside a .zip file, why?) but absolutely no explanation is given as to what one should actually do with the bunch of PHP and SQL files included in it. Using regular expressions and configuring JMeter to run tests using loops is covered but this doesn't make much sense as there is no context for the example used in setting this all up. Fortunately the sections on using JMeter to test a database and an FTP server are introduced with clear setup steps that are easy to follow. I wouldn't classify most of this material as advanced, it just gives the reader the knowledge that JMeter can be used to test more than just HTTP sites and provides a few very simple examples which they can build on.
Finally the book wraps up by stressing once again that it's just an introduction to JMeter and a concluding table clearly showing that more is not covered than actually covered. The appendices consist of definitions of nearly every JMeter element that can be accessed in the GUI (a good quick reference), some pointers to material for readers interested in learning more, and a glossary of testing terms, the vast majority of which are never used in the book itself. Unfortunately the latter is yet more evidence of the biggest weakness of this book — the appalling editing that doesn't even remove sentences which are completely incorrect. 'You can too contribute.' (the closing sentence of Chapter 1) is just one of many examples of poor writing that somehow survived into print.
On the whole the book does give one an overview of how to get started with JMeter and the section on load testing a website is a useful introduction to various JMeter concepts. This is the only printed book on the topic out there so if you learn best reading from print then you don't have many options. This is a shame as a niche topic like this could do with an interesting, well-informed and authoritative guide. For everyone else I would suggest reading the User Manual on the JMeter website as it covers all the material here (and much more) and is far more readable.
You can purchase Apache JMeter from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Apache JMeter starts off with a not particularly convincing overview of why one would want to automate testing and goes off on a tangent trying to prove the monetary savings this leads too. Any testing will depend very much on the type of software being tested, the skills of the tester, technology stack in use etc. so trying to come up with a general formula proving that testing will save money is probably impossible and pointless. It would have been far more useful to include some practical examples where testing saved time, effort, caught bugs early etc. A very brief history of JMeter is provided as well as an overview of its GUI and the the various elements available. For those who haven't used it before — JMeter acts as a client which sends requests to the application being tested and can then act on the responses returned. Overall this isn't the smoothest of introductions with lots of grammatical errors, fragmented text and repeated concepts, which doesn't bode well for the rest of the book.
Installing and setting up JMeter is covered next and this is straightforward and simple. A good overview of what a JMeter test plan consists of is provided and this covers controlling how many simultaneous users a test will use, what logic and timing will be used to issue requests, the type of requests (e.g. HTTP for web sites, FTP for file retrieval etc.), various configuration options, how to assert the contents of responses and so on. The book is a bit dated and the version of JMeter I was using didn't always match up with the text and diagrams but most of the differences were self explanatory so this wasn't really an issue.
The chapter on load and performance testing is the best on offer and provides sensible guidelines on this type of testing. These include tips such as ensuring network bandwidth between the machines under test, running the tests on physically separate machines from the software being tested, running tests for long periods of time and what to monitor. This is mainly common sense but it's good to see them summarized and the book would have benefited from more sections that appear to be informed by the author's practical experiences as a tester. The example given in the book is the load testing of a web site over HTTP and it's left up to the reader to translate the various types of request being made to an example website of their own. The screen shots of setting the various GUI values are clear and useful. Remote testing (i.e. not using a single JMeter GUI but multiple command-line instances of JMeter) is mentioned but sadly not covered which is a shame as any serious load or stress testing usually requires this. Using JMeter as a proxy to quickly generate a test plan by recording HTTP requests from a browser is both neat and useful and explained well.
JMeter is not just limited to load testing but can also be used to do simple functional tests as it can inspect the values returned by requests and perform assertions on these responses (e.g. checking that the returned HTML contains some text). Unfortunately functional testing is covered very poorly with far too little detail and no explanation of how to run the examples yourself. The author should have stuck to one simple use case (ideally that the reader could follow along with) which would show how to add one's own custom values to requests and to assert the results returned. In the end I could figure it out for myself, but I'd expect a book to guide me through this.
Advanced features are up next and the reader is pointed towards the sample code included with the book (a .rar file inside a .zip file, why?) but absolutely no explanation is given as to what one should actually do with the bunch of PHP and SQL files included in it. Using regular expressions and configuring JMeter to run tests using loops is covered but this doesn't make much sense as there is no context for the example used in setting this all up. Fortunately the sections on using JMeter to test a database and an FTP server are introduced with clear setup steps that are easy to follow. I wouldn't classify most of this material as advanced, it just gives the reader the knowledge that JMeter can be used to test more than just HTTP sites and provides a few very simple examples which they can build on.
Finally the book wraps up by stressing once again that it's just an introduction to JMeter and a concluding table clearly showing that more is not covered than actually covered. The appendices consist of definitions of nearly every JMeter element that can be accessed in the GUI (a good quick reference), some pointers to material for readers interested in learning more, and a glossary of testing terms, the vast majority of which are never used in the book itself. Unfortunately the latter is yet more evidence of the biggest weakness of this book — the appalling editing that doesn't even remove sentences which are completely incorrect. 'You can too contribute.' (the closing sentence of Chapter 1) is just one of many examples of poor writing that somehow survived into print.
On the whole the book does give one an overview of how to get started with JMeter and the section on load testing a website is a useful introduction to various JMeter concepts. This is the only printed book on the topic out there so if you learn best reading from print then you don't have many options. This is a shame as a niche topic like this could do with an interesting, well-informed and authoritative guide. For everyone else I would suggest reading the User Manual on the JMeter website as it covers all the material here (and much more) and is far more readable.
You can purchase Apache JMeter from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
I bought a Spring book from Packt which was full of wrong information, code examples that were garbage, et cetera. Packt is still selling the book, errors in place, and attempted to bribe me to remove my public requests to them to fix the book, instead of just fixing the book.
It's a shovel-ware scum publisher from India. They don't edit. Many of their books are essentially whole-sale theft of manuals.
Never buy Packt.
StoneCypher is Full of BS
slashdot = stagnated
Sh$%$@t
!
Another Slashvertisement posing as news.
Six months to Slashdot's closing.
Good riddance.
Yours In Osh,
K. Trout, C.E.O.
From the summary it's clear that this was going to be a scathing review. Felt uncomfortable even considering "Read below for ..."
Looking at the author's bio on Pact's web site: http://www.packtpub.com/authors/profiles/emily-h-halili it would appear that English may not be her first language, and given that she's worn 6 different IT hats in 12 years, she's obviously not spent enough time doing any one thing to become an expert at anything. And now she's a consultant, which affirms the old saying "those who cannot do, teach".
I was disappointed to see that the book is apparently crap. I've been wanting a good JMeter book for about 5 years.
So is anyone else actually using JMeter? Where do you go for your info/help?
It's been a while since I used JMeter, but I had good luck using a web capture/replay tool called Badboy as a functional input to JMeter.
I created the functional tests with Badboy, then export/imported them into JMeter. JMeter ran the Badboy functional tests with my desired testing characteristics. I got a pretty good overview of the performance of the application under test (an XML service that front-ended a database).
The problem with using load testing tools like JMeter for finding web site performance is that it's total guesswork to separate the web server performance from the network performance.
It's a similar story with Packt's Blender book. Full of factual errors, spelling mistakes [yes, spelling misakes - what ever happened to spell checkers?], non sequiturs and diagrams that don't correspond with their descriptions. I posted a review to Amazon explaining all of the above but they spiked it. Fuckers.
Yet another book about something you've never heard of and probably incorrect at that.
one of their recruiters approached me last year to write a book on numpy. which was curious to me since while i've used it (and posted some very minor public code using it), i'm not a contributor, nor involved in the community in any way.
some googling led to some fairly consistent stories:
very little editing work
very low sales (rep told me 1000 copies would be considered successful for a sequel)
don't expect more than your initial front (~$3500, which isn't even a front; they pay it out over the different chapters you submit)
if they can they get multiple authors writing in the same category at the same time (which means you're basically competing against your own publisher)
needless to say: didn't want to sign my name to anything like that...
http://kered.org
... is how I feel after I've purchased the book?
Stop it with the Packit book reviews. These books are uniformly bad and overpriced. I made the mistake of buying the one on Tapestry and it was full of incorrect information and didn't address any topics beyond the Hello World level.
The book actually hindered my efforts to get up to speed on this framework.
-1 Overrated on this book, review, the editor who posted it and the shill who reviewed it.
I use jmeter at work and it took all of about a couple of days to come up to speed on it. I've written some plugins for it now. Everything I learned was from their user manual and the source code. I'm not sure you need a book for it, but it kind of sounds like I could do a better job of writing one in any event. Hmm...
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?