Kafka tests
This topic describes how to use Kafka scripts in 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, and view run results in the Kafka graphs 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.
Prerequisite | Description |
---|---|
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 fromSupport 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 OpenText Enterprise Performance Engineering.
You can upload the script in any of the following ways:
-
Directly from VuGen. For details, see the OpenText Virtual User Generator Help Center.
-
From the user interface or REST API. For details, see Upload a script.
After uploading the script, it is added to the test management tree. You can view and edit most scripts directly from within the user interface. For details, see Edit a script.
-
-
(Optional) Edit the script parameters
After you have uploaded a Kafka script, you can edit the script parameters. For details, see Edit script parameters.
-
Create a performance test, and assign the Kafka script to it.
For details, see Tests.
-
(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 graphs. For details, see View Kafka test results.
View Kafka test results
Measurements can be viewed in online and offline graphs and in 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: