Introducing the JMeter Test Plan Template, a Cognifide innovation that makes AEM performance testing more efficient.
With every new project comes the need for performance testing. And although each project requires a bespoke approach, there are always elements of the testing procedure that are repetitive. Actually, repetitive is understating it, they can often be tedious and boring. To us, this is just a waste because those very same elements, approached in a different way, could become reusable, rather than repetitive. So, using JMeter, a tool that we use to execute our performance tests, we looked at creating a solution to repeating common tasks across every project. We came up with the JMeter Test Plan Template, especially useful if you are working in Adobe Experience Manager since you will usually be calling on AEM API as part of your test.
If you want to make performance testing with JMeter more efficient, grab our template and test it! First, here's what you'll find:
- Parametrization - re-used, preconfigured user variables.
- Tuned for AEM - there is a preconfigured thread that activates a page on author to replicate the page via author-publish-dispatcher path. The tread also shows how to authenticate to AEM Author instance and reuse a CSRF token (works with AEM 6.5) to simulate real system usage.
- Preconfigured loggers - preconfigured simple data writers for .csv, .xml and influx database (for Live monitoring).
- Think times with with parametrized Gaussian Random Timer (real user behaviour simulation)
- Test profiles with user defined variables for different test environments
- An http request configured to download embedded resources, parallel download and filtering out calls to 3rd party domains
- Exemplary http requests (GET, POST) and config elements (transaction and throughput controllers).
The template is working with JMeter 5.1.1 with the following set of plug-ins (install Plug-in Manager first - https://jmeter-plugins.org/wiki/PluginsManager/#Installation-and-Usage ):
- 3 basic graphs
- 5 additional graphs
- Distribution/percentile graphs
Once you have downloaded Plug-in Manager, download the template (.jmx file) and put it into the
folder. Then edit
\bin\templates\templates.xml and add a snippet from
\jmeter-aem-templates\templates.xml or paste
<template isTestPlan="true"> <name>AEM WebApplication Test Plan</name> <fileName>aem-template.jmx </fileName> <description><![CDATA[ <h1>AEM WebApplication Test Plan</h1> <h2>Overview</h2> <ul> <li>Parametrization - re-used, preconfigured User Variables</li> <li>Tuned for AEM - preconfigured thread that activates page on author (to replicate page via author-publish-dispatcher path). Thread also presents how to authenticate to AEM Author instance and reuse CSRF token (works for AEM 6.5)</li> <li>Preconfigured loggers - preconfigured Simple Data Writers for .csv, .xml and Influx database (for Live monitoring)</li> <li>Think times with with parametrized Gaussian Random Timer</li> <li>Test Profiles with User Defined Variables for different test environments</li> <li>HTTP Request configured for download embedded resources, parallel download and filtering out calls to 3rd parties domains</li> <li>Exemplary HTTP Requests (GET, POST) and Config Elements (Transaction and Throughput Controllers)</li> </ul> <h2>Useful links</h2> <ul> <li><a href="https://github.com/Cognifide/jmeter-aem-templates" >Cognifide Labs GitHub documentation </a></li> </ul> ]]></description> </template>
After running JMeter, choose the option
File->Templates then select from the drop-down
AEM WebApplication Test Plan
and click the
Create button. And that's it!
So, next time that you start new performance tests, just take this template and enjoy the fact that some of the basic work has been done for you. All download details and other references are below and please share your comments, recommendations and improvements.
For more features see GitHub documentation: https://github.com/Cognifide/jmeter-aem-templates/blob/master/README.md
For GitHub Download: https://github.com/Cognifide/jmeter-aem-templates
This post was originally published on: https://www.cognifide.com/our-blogs/quality-assurance/accelerate-aem-performance-tests-implementation, opens in a new window