Unofficial Content

This is a brief document about the building of stress test scripts for Java and NET applications (the sample images are for NET but for Java applies the same idea).
Please refer to the Apache Jmeter documentation for details on executing tests and configuring parameters.

Scripts for GET method requests

PreRequisites:

  • In order to be able to make Stress Tests to Web Objects, the Application shoud have Encrypt URL parameters property disabled. If not, Http Request will return 403 Forbidden after the Session Key expires. 


In order to build a GET test script, just add the HTTP Request Sampler to the Thread group:

testsampler

Then, complete the path with the corresponding URL where the GET will be executed:

geturl

Add the test listener you desire as the figure shows:

testlistener

Execute the test (Run -> Start) and see the results in the listener pane.

Scripts for POST method requests

Note that GeneXus has many built-in algorithms to prevent simulated Http Posts to Execute WebPanel object Events. If Stress test is required, some of these mechanisms must be disabled. If not, the Test will fail with Http Status 401 or 403. 

How to simplify POST Testing:

  • Enable Javascript Debug Mode = True
  • Disable Web Security: Open GeneXus.exe.config. Comment: <add key="HiddenCategoriesProperties" value="AdvancedSecurity" /> . Restart GeneXus. This will show a new Propery: Web Security Level. Set to "LOW". 

Rebuild is required. 

 

Suppose that you want to simulate the execution of n POSTs to the Customer transaction under concurrency.

First, in order to know which parameters you need to configure in the test script, just use any proxy tool like proxytrace to intercept the dialog between client and server and identify the parameters sent in the body of the request.


The following figure shows how those parameters can be seen:

testnetproxy

Afterwards, add the parameters to the test script and that's all, the script is prepared to be run.

testnet

Make sure the GXState variable is added on the request post body otherwise the case will not work.

Note: In the workbench node you can add an HttpProxy server, and record the execution, so that the ThreadGroup is added automatically with the needed variables.

 

Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant