User's Manual: Building a Simple Database Test Plan</title><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="http://fonts.googleapis.com/css?family=Merriweather:400normal"rel="stylesheet"type="text/css"><linkrel="stylesheet"type="text/css"href="../css/new-style.css"><linkrel="apple-touch-icon-precomposed"href="../images/apple-touch-icon.png"><linkrel="icon"href="../images/favicon.png"><metaname="msapplication-TileColor"content="#ffffff"><metaname="msapplication-TileImage"content="../images/mstile-144x144.png"><metaname="theme-color"content="#ffffff"></head><bodyrole="document"><ahref="#content"class="hidden">Main content</a><divclass="header"><!--
</script></div><divalign="center"><ahref="https://github.com/apache/jmeter"><imgalt="star this repo"src="http://githubbadges.com/star.svg?user=apache&repo=jmeter&style=flat"></a><ahref="https://github.com/apache/jmeter/fork"><imgalt="fork this repo"src="http://githubbadges.com/fork.svg?user=apache&repo=jmeter&style=flat"></a></div><divalign="center"><ahref="https://maven-badges.herokuapp.com/maven-central/org.apache.jmeter/ApacheJMeter"><imgalt="Maven Central"src="https://maven-badges.herokuapp.com/maven-central/org.apache.jmeter/ApacheJMeter/badge.svg"></a></div></div><ulclass="menu"><lionClick="return true"><divclass="menu-title">About</div><ul><li><ahref="../index.html">Overview</a></li><li><ahref="http://www.apache.org/licenses/">License</a></li></ul></li></ul><ulclass="menu"><lionClick="return true"><divclass="menu-title">Download</div><ul><li><ahref="../download_jmeter.cgi">Download Releases</a></li><li><ahref="../nightly.html">Developer (Nightly) Builds</a></li></ul></li></ul><ulclass="menu"><lionClick="return true"><divclass="menu-title">Documentation</div><ul><li><ahref="../changes.html">Changes per version</a></li><li><ahref="../usermanual/get-started.html">Get Started</a></li><li><ahref="../usermanual/index.html">User Manual</a></li><li><ahref="../usermanual/best-practices.html">Best Practices</a></li><li><ahref="../usermanual/component_reference.html">Component Reference</a></li><li><ahref="../usermanual/functions.html">Functions Reference</a></li><li><ahref="../api/index.html">Javadocs</a></li><li><ahref="../building.html">Building JMeter and Add-Ons</a></li><li><ahref="http://wiki.apache.org/jmeter">JMeter Wiki</a></li><li><ahref="http://wiki.apache.org/jmeter/JMeterFAQ">FAQ (Wiki)</a></li></ul></li></ul><ulclass="menu"><lionClick="return true"><divclass="menu-title">Tutorials (PDF format)</div><ul><li><ahref="../usermanual/jmeter_distributed_testing_step_by_step.pdf">Distributed Testing</a></li><li><ahref="../usermanual/jmeter_proxy_step_by_step.pdf">Recording Tests</a></li><li><ahref="../usermanual/junitsampler_tutorial.pdf">JUnit Sampler</a></li><li><ahref="../usermanual/jmeter_accesslog_sampler_step_by_step.pdf">Access Log Sampler</a></li><li><ahref="../extending/jmeter_tutorial.pdf">Extending JMeter</a></li></ul></li></ul><ulclass="menu"><lionClick="return true"><divclass="menu-title">Community</div><ul><li><ahref="../issues.html">Issue Tracking</a></li><li><ahref="../mail.html">Mailing Lists</a></li><li><ahref="../svnindex.html">Source Repositories</a></li><li><ahref="../building.html">Building and Contributing</a></li><li><ahref="https://projects.apache.org/project.html?jmeter">Project info at Apache</a></li><li><ahref="http://wiki.apache.org/jmeter/JMeterCommitters">Contributors</a></li></ul></li></ul><ulclass="menu"><lionClick="return true"><divclass="menu-title">Foundation</div><ul><li><ahref="http://www.apache.org/">ASF</a></li><li><ahref="http://www.apache.org/foundation/getinvolved.html">Get Involved in the ASF</a></li><li><ahref="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><ahref="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></li></ul></div><divclass="main"id="content"><ulclass="pagelinks"><li><ahref="build-adv-web-test-plan.html">< Prev</a></li><li><ahref="../index.html">Index</a></li><li><ahref="build-ftp-test-plan.html">Next ></a></li></ul><divclass="section"><h1id="building">7. Building a Database Test Plan<aclass="sectionlink"href="#building"title="Link to here">¶</a></h1>
to get the <b>Add</b> menu, and then select <spanclass="menuchoice"><spanclass="guimenuitem">Add</span> → <spanclass="guimenuitem">Config Element</span> → <spanclass="guimenuitem">JDBC Connection Configuration</span></span>.
<p>Set up the following fields (these assume we will be using a MySQL database called 'cloud'):</p>
<ul>
<li>Variable name (here: myDatabase) bound to pool. This needs to uniquely identify the configuration. It is used by the JDBC Sampler to identify the configuration to be used.</li>
to get the <b>Add</b> menu, and then select <spanclass="menuchoice"><spanclass="guimenuitem">Add</span> → <spanclass="guimenuitem">Sampler</span> → <spanclass="guimenuitem">JDBC Request</span></span>.
</div><divclass="section"><h1id="adding_listener">7.3 Adding a Listener to View/Store the Test Results<aclass="sectionlink"href="#adding_listener"title="Link to here">¶</a></h1>
<p>The final element you need to add to your Test Plan is a
<ahref="component_reference.html#listeners">Listener</a>. This element is
responsible for storing all of the results of your JDBC requests in a file