Kafka tests
This topic describes how to use Kafka scripts in LoadRunner Enterprise performance tests.
Kafka tests overview
Apache Kafka is an event-streaming platform that provides unified, high-throughput, low-latency data feeds. It is often used to pass messages between microservices and software components. Refer to the product documentation for more details.
You can manually create your script in VuGen using the Kafka protocol, then add it to a performance test in LoadRunner Enterprise, and view run results in the Kafka graphs in LoadRunner Enterprise and Analysis. The Kafka protocol supports scripting in Java, using standard Java conventions.
Kafka scripts can be run on a load generator on a Windows or Linux operating system. The Docker installations of Windows and Linux also support Kafka scripts.
Prerequisite setup for Kafka tests
Note the following guidelines before creating a performance test with a Kafka script:
Installation requirements |
Download and install a 32-bit or 64-bit JDK (version 8 or 11) on all load generator machines on which the script is run. For supported versions of Kafka, see the Supported Protocols guide (available from Support Matrix). |
Load generator setup |
|
LoadRunner Agent settings |
|
Creating Kafka scripts |
|
Add Kafka scripts to performance tests
This task describes how to add Kafka scripts to performance tests.
-
Make sure that you follow the prerequisites for using Kafka scripts.
For details, see Prerequisite setup for Kafka tests.
-
Upload Kafka scripts to LoadRunner Enterprise
You can upload the script in any of the following ways:
-
Directly from VuGen. For details, see Integration with LoadRunner Enterprise in the Virtual User Generator Help Center.
-
From the LoadRunner Enterprise user interface or from the LoadRunner Enterprise REST API. For details, see Upload a script to LoadRunner Enterprise.
After uploading the script to LoadRunner Enterprise, the script is added to the test management tree. You can view and edit most scripts directly from within the LoadRunner Enterprise user interface. For details, see Edit a script.
-
-
(Optional) Edit the script parameters
After you have uploaded a Kafka script to LoadRunner Enterprise, you can edit the script parameters. For details, see Edit script parameters.
-
Create a LoadRunner Enterprise test, and assign the Kafka script to it.
For details, see Design a test.
-
(Optional) Configure runtime settings
Before you run a performance test, you can view and configure the behavior of the Vuser scripts in the test using runtime settings. For details, see Configure runtime settings.
-
Run the test.
For details, see Manage a performance test run.
Data points from Kafka tests are displayed in the LoadRunner Enterprise graphs. For details, see View Kafka test results.
View Kafka test results
Measurements can be viewed online and offline in LoadRunner Enterprise and Analysis, using the data points from the Kafka tests.
The following monitors are available for performance tests running Kafka scripts:
Monitor | Description |
---|---|
Kafka Producer Duration |
Displays the response time, in milliseconds, between a record sent and a confirmation received, each time the Kafka producer sends a record to the broker. |
Kafka Throughput |
Displays the amount of data, in bytes, that the producer published to (Publish throughput), or the consumer received from (Receipt throughput), the broker at any time during the performance test run. |
Kafka Message Rate |
Displays the number of messages published (Publish rate) and received (Receive rate) per second, at any time during the performance test run. |
See also: