November 1, 2018

Introducing the Siebel CRM Correlation Plugin in JMeter

Open Source Automation

BlazeMeter Labs has released a plugin that enables you to easily create a script to load test your Siebel CRM application with Apache JMeter™. Siebel CRM (Customer-relationship management) is a software from Oracle, used by companies to manage their interaction with current and potential customers. However, Siebel CRM applications contain lots of dynamic values, which make correlation very complex. Obtaining these dynamic values require multiple regular expression extractors in your JMeter script. This can be time consuming and repetitive.

Luckily, with the new Siebel CRM Correlation plugin, you will not need to take care of correlating those values. The plugin will do it for you instead, as well as recording the script. Let’s see how it works.


Back to top

The Siebel CRM Correlation


The Siebel CRM Correlation plugin is a SiebelHTTP(S) Test Script Recorder element. The recorder contains three tabs: Test plan creation, Requests Filtering and Siebel Correlation. This element is the default JMeter recorder, with a new tab: Siebel Correlation. Siebel Correlation contains a set of predefined rules for autocorrelation, which are the most common dynamic values that need to be correlated when scripting against a Siebel application. You can also add your custom rules or remove rules from the table.

After configuring the autocorrelation rules, or using the predefined ones, you need to start the recording like with the normal HTTP(S) Test Script Recorder. Once you have started the recording, the plugin will evaluate all the regular expressions of the rules present in the Siebel Correlation tab, against every sample result. When the regular expression matches the sampler result, one or many Pre/Post Processors elements will be added as child elements of the sampler, depending on the rule. They will create the variables that are later used for correlation. This process of correlating the script on the go will provide you with a parameterized script just after finishing the recording, which you can then execute.


Back to top

Creating Your JMeter Script with the Siebel CRM Correlation Plugin


Getting the Plugin


1. The Siebel CRM Correlation plugin is available to download from the JMeter Plugins Manager. Open the JMeter Plugins Manager on JMeter (If you haven’t it, read How to Install the JMeter Plugins Manager).

2. Select the Available Plugins tab on JMeter Plugins Manager.

3. In the search field write Siebel, and then select the Siebel CRM Recorder plugin’s checkbox.

4. Click the button ApplyChanges and Restart JMeter.


Back to top

Script Recording


5. A Siebel Recording Template is available to facilitate the script creation. Click on Files → Templates... and search for Recording Siebel.


The template will add the elements you can see below:

jmeter siebel correlation plugin

If you do not want to use the template, you can add the Siebel HTTP(S) Test Script Recorder element by right-clicking on the Test Plan element to get the Add menu: (Add → Non-Test Elements → Siebel HTTP(S) Test Script Recorder).

run a load test for siebel crm

  • Then, follow the steps below. The first ones are the same as recording with the classic HTTP(S) Test Script Recorder:
  • Install the JMeter CA certificate (in order to record HTTPS requests).
  • Set up the browser to use the proxy for all HTTP and HTTPS requests.
  • Set up the correlation rules that you want to use.


Back to top

Value Correlation


6. By default, the plugin includes a set of predefined rules to autocorrelate the most common Siebel dynamic values that need to be parameterized.

how to run performance tests on Siebel CRM apps

Some of the rules also consider the possibility that the server might return the response within dynamic regex boundaries, for example, the regex cks([^~\[%|])(.*?)\1** will search for either **, ^, ~, [, % or | as boundaries.


7. It is possible to add new rules by clicking on the Add button or Edit the predefined ones.

The Siebel Correlation tab contains six columns, five of them are used to configure the Regular Expression Extractor:

  • Reference Name / Name of created variable - The name of the JMeter variable in which to store the result.
  • Request Regex - Regular Expression that will be used to perform the autocorrelation.
  • Response Regex - Regular Expression that will be set in the Regular Expression Extractor.
  • Match Number - Indicates which match to use.
  • Match Group - The number of the capturing group to be used.
  • Field to check - Which field to check the regular expression against. * The following fields can be checked (from JMeter documentation): * Body - the body of the response, e.g. the content of a web-page (excluding headers) * Body(unescaped) - the body of the response, with all Html escape codes replaced. Note that Html escapes are processed without regard of context, so some incorrect substitutions may be made. Note that this option highly impacts performances, so use it only when absolutely necessary and be aware of its impacts. * Body as a Document - extract text from various type of documents via Apache Tika. Note that Body as a Document option can impact performance, so ensure it is OK for your test. * Request Headers - the request header of the HTTP sampler. * Response Headers - the response header of the HTTP sampler. * URL * Response Code - e.g. 200 * Response Message - e.g. OK


8. Click the Start button on the Siebel HTTP(S) Test Script Recorder.


9. Reproduce the workflow in the Siebel app (manually).


10. After starting the recording, the recorded requests appear in the Recording Controller just like in the normal HTTP(S) Recorder.


11. By looking at the requests, you can see that the regex extractors and the parameterized values were added by the Siebel HTTP(S) Test Script Recorder:

testing scripts for Siebel, oracle

The below capture shows one HTTP Request with the automatic correlation.

jmeter correlation, siebel CRM

Elements that are automatically added by JMeter during the recording:

  • Regular Expression Extractor: the most common one you will see. Used to extract dynamic values and store them as variables.
  • JSR223 PostProcessor: used to parse Siebel Star Array strings and store the values as variables.
  • JSR223 PreProcessor: used to calculate one particular Siebel parameter, the SWEC (SWE Count. A specific Siebel parameter with a different correlation to the others). In the PreProcessor you will see that the script will add or subtract numbers to that value and store it in a variable.


12. The plugin will also apply the Request Regular Expression against the recorded samples. If there is an occurrence, then it will be replaced and parameterized using the corresponding Reference name.


That’s it! Your script is ready to be executed, no need to invest time in parameterizing the complex Siebel parameters because the plugin has already done it for you.


Back to top

Siebel Star Array Strings


One of the unique features the Siebel CRM plugin offers is the ability to parse Siebel Star Array Strings. This is performed with the __splitStarArray function.

The function receives two parameters, the string to split and the reference name (both without quotes) to store the variables. It splits the string passed to it and returns the original string. The split strings are returned in the variables ${VAR_1},  ${VAR_2} etc. The count of variables is returned in ${VAR_n}.

The function searches for the number before an occurrence of "*", uses that value as the length of the number of characters to store, and then repeats if there is another occurrence of "*".




${__splitStarArray(8*testUser12*testPassword6*VRId-0, VAR)}


This will return the original string to split and set the following variables:

  • VAR_n=3
  • VAR_1=testUser
  • VAR_2=testPassword
  • VAR_3=VRId-0


When the server returns variables using a star array, the plugin will use the function above inside a JSR223 PostProcessor, to create the variables during execution. This makes the script dynamic.

After creating your JMeter script for testing Siebel CRM applications, you can upload your script to BlazeMeter and enhance your testing abilities with reporting, collaboration and scalability.



Related Resources: 

Back to top