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 JDBC Request sampler


Sometimes, it's necessary to test durability and I/O operations against the database directly. How fast are inserts, updates, and selects on the tables in question? For such tests, JMeter provides a JDBC Request sampler to help issue SQL queries against the database. However, to use it, we need to set up a JDBC Connection Configuration component. Setting up this component requires us to point to a database. So let's go ahead and set up the database. Normally, this will already be set up for you to test against, but for illustrative purposes, we are going to assume none has been set up. We will be using H2, an open source pure Java SQL database. It is lightweight and relatively easy to set up.

Setting up an H2 database

  1. Download a distribution at .

  2. Extract the archive to a location of your choosing. We will refer to this as H2_HOME.

  3. From the command line, go to the H2_HOME/bin folder.

  4. Start the H2 database server by issuing either of these commands.

    • On Unix:

      ./h2.sh
      
    • On Windows...