Run Kafka messages

This feature is only available in the Test Automation for SAP API Scan and not in Tricentis Test Automation for SAP Commander. Tricentis Test Automation for SAP does not support the execution of TestCases using this feature.

To learn about upgrade options, check out SAP Enterprise Continuous Testing by Tricentis.

Tricentis Test Automation for SAP API Scan enables you to run messages using an Apache Kafka connection. A Kafka topic stores records, i.e. messages, that are sent by one or more publishers and read by one or more consumers. This allows different systems to communicate independently, for instance if one of them is offline. Furthermore, Kafka topics can be split into multiple partitions. This allows for a distribution of large amounts of data on one or more servers.

Producers are responsible for publishing records in a topic. Consumers read these records. Each consumer is part of a consumer group that subscribes to a topic. You can select whether you want to publish records or consume records, i.e. if you want to pull messages from a Kafka topic or push messages to a Kafka topic.

After running your Kafka records in API Scan, you can export them to Test Automation for SAP Commander and use the record information to define Module Attributes and verify their values.

Authentication with the Kafka connection uses the SASL/PLAIN mechanism. The Kafka connection is available only if SASL/PLAIN authentication is enabled.

Pull records

To pull records from a Kafka topic, follow the steps below:

  1. Create a message from a URI or file, or create a new message.

  2. Select a Kafka connection from the Connection dropdown menu.

  3. Select Pull from the Action dropdown menu.

  4. You can specify a partition offset to pull records from a specific point on. An offset defines the position of a record in the partition and depends on the order in which the records were committed. By specifying an offset, you can define whether to start reading older records, for instance, or to begin with the newest one. By default, API Scan pulls the last unread record.

    To specify the offset, enter a number into the Partition Offset field. To start with the first record, enter the value 0.

Configure Connection, Action, and Partition Offset

  1. Click on Run in the API Scan menu to pull a record from the topic.

Response of a pull message

Push records

To push records to a Kafka topic, follow the steps below:

  1. Create a message from a URI or file, or create a new message.

  2. Select a Kafka connection from the Connection dropdown menu.

  3. Select Push from the Action dropdown menu.

Select Connection and Action

  1. Click on Run in the API Scan menu to push your record to the topic.

The response indicates if the record was pushed to the topic successfully.

Response of a push message