Updating JMeter test scripts after migrating to Pega 8.4 and later
+
This content applies to On-premises, Client-managed cloud and Pega Cloud environments
In Pega Platform™ 8.4 the URL format changed to support multiple mashups in same browser and to enable a user to log into multiple applications in a single browser session. The application URL also lays the foundation for Pega as a service using an application-centric experience.
Existing URLs in Pega Platform 8.3 and earlier follow this format:http://<host>/prweb/PRServlet
Application URLs in Pega Platform 8.4 follow this format: http://<host>/prweb/PRServlet/app/<applicationAlias>
This URL change requires users of Jmeter test automation scripts to update those scripts for the new URL format.
- Open the application definition in Dev Studio to find your application URL alias.
- Select
http://engperf-colliders-app16:8080/prweb/app/CustomerService/
. For example
The last URL component after /app/
is the application alias. In the above example CustomerService
is the application alias. By default, this is set to the sanitized application name. The sanitized application name is the application name without special characters. You can modify the application URL as necessary.
Global variables in the JMeter script
In all the Pega URLs, the root context is same, for example /prweb
. There will also be one or two servlets defined in the whole JMeter script, for example /PRServlet
or /PRAuth.
For example, a global variable called ROOT_CONTEXT
is defined with the value /prweb
and another variable called ROOT_SERVLET
with the value /PRServlet
.
If the global variables above are part of the JMeter requests:
- In all the JMeter requests that contain only
ROOT_CONTEXT
and does not haveROOT_SERVLET
, replace${ROOT_CONTEXT}
with${ROOT_CONTEXT}/app/<ApplicationAlias>.
- In all the JMeter requests that contain
ROOT_CONTEXT
along withROOT_SERVLET
, replace${ROOT_CONTEXT}/${ROOT_SERVLET}
with${ROOT_CONTEXT}/${ROOT_SERVLET}/app/<ApplicationAlias>.
If the hard-coded root context and servlets are part of the JMeter requests:
- If the JMeter requests contain only
/prweb
and it doesn’t have any servlet, then replace/prweb
with/prweb/app/<ApplicationAlias>.
- If the JMeter requests contain
/prweb
along with any servlet (for example,PRServlet
), then replace/prweb/PRServlet
with/prweb/PRServlet/app/<ApplicationAlias>
.
You can either define a global variable for application alias (for example app/PegaRULES)
or directly suffix the value to each JMeter request. The position of other URL components like access group hash, thread name, query parameters etc., remain the same. Modifying each request in the JMeter console can take more time if there are hundreds of requests. The process above steps can be executed by opening the JMeter script in a text editor and modifying the request.