Book Image

Performance Testing with JMeter 2.9

By : Bayo Erinle
Book Image

Performance Testing with JMeter 2.9

By: Bayo Erinle

Overview of this book

Performance testing with JMeter 2.9 is critical to the success of any software product launch and continued scalability. Irrespective of the size of the application's user base, it's vital to deliver the best user experience to consumers. Apache JMeter is an excellent testing tool that provides an insight into how applications might behave under load enabling organizations to focus on making adequate preparations. Performance Testing with JMeter 2.9 is a practical, hands-on guide that equips you with all the essential skills needed to effectively use JMeter to test web applications using a number of clear and practical step-by-step guides. It allows you take full advantage of the real power behind Apache JMeter, quickly taking you from novice to master. Performance Testing with JMeter 2.9 begins with the fundamentals of performance testing and gets you acquainted with JMeter. It will guide you through recording realistic and maintainable scripts. You will acquire new skills working with tools such as Vagrant, Puppet, and AWS, allowing you to leverage the cloud to aid in distributed testing. You will learn how to do some BeanShell scripting and take advantage of regular expressions, JMeter properties, and extension points to build comprehensive and robust test suites. Also, you will learn how to test RESTful web services, deal with XML, JSON, file downloads/uploads, and much more. Topics like resource monitoring, distributed testing, managing sessions, and extending JMeter are also covered. Performance Testing with JMeter 2.9 will teach you all you need to know to take full advantage of JMeter for testing web applications, dazzle your co-workers, and impress your boss! You will go from novice to pro in no time.
Table of Contents (14 chapters)

The JSON Path Extractor element


Another helpful nugget in the JMeter plugin's project is the JSON Path Extractor element. This makes working with JSON pure bliss. It helps extract data out of a JSON response using JSONPath syntax (http://goessner.net/articles/JsonPath/index.html#e2). For complex JSON structures, using JMeter's bundled XPath Extractor can sometimes lead to heartache when trying to get at targeted elements. Where XPath Extractor fails, JSON Path Extractor shines.

Consider a JSON structure like the following:

{ "store": {
    "book": [ 
{ "category": "reference",
        "author": "Nigel Rees",
        "title": "Sayings of the Century",
        "price": 8.95
      },
{ "category": "fiction",
        "author": "Evelyn Waugh",
        "title": "Sword of Honour",
        "price": 12.99
      },
{ "category": "fiction",
        "author": "Herman Melville",
        "title": "Moby Dick",
        "isbn": "0-553-21311-3",
        "price": 8.99
      },
{ "category": "fiction",
     ...