Run Amazon Standard Queues

To run standard Amazon SQS messages, choose one of the following connection types and follow the steps below.

Methods: Push, Pull and Purge actions.

Option 1 - Run Amazon SQS messages with a predefined connection

Push messages

To push messages with a predefined Amazon SQS message, follow the steps below:

  1. Create a new message.

  2. In the Connection section, go to Manage to create an Amazon SQS connection.

  3. From the Connection drop-down menu, select your connection.

  4. In the Action drop-down menu, select Push. The Endpoint field displays the ARN.

  5. In the Payload field, enter your message.

  6. Click on Run in the API Scan menu to send your message to the specified queue.

Push Amazon SQS message in API Scan

Pull messages

To pull messages with a predefined Amazon SQS message, follow the steps below:

  1. Create a new message.

  2. In the Connection section, go to Manage in order to create an Amazon SQS connection.

  3. From the Connection drop-down menu, select your connection.

  4. In the Action drop-down menu, select Pull. The Endpoint field displays the ARN.

  5. Click on Run in the API Scan menu to receive your message in the specified queue. Only one message is retrieved at a time. To retrieve multiple messages, create a Loop. Also see Amazon SQS Visibility Timeout.

Pull Amazon SQS message in API Scan

Purge a queue

To purge an Amazon SQS queue with a predefined connection, follow the steps below:

  1. In the Connection section, go to Manage in order to create an Amazon SQS connection.

  2. From the Connection drop-down menu, select your connection.

  3. In the Action drop-down menu, select Purge. The Endpoint field displays the ARN.

  4. Click on Run in the API Scan menu to purge the specified queue. The queue is then cleared of all messages.

Purge Amazon SQS queue in API Scan

Option 2 - Run Amazon SQS messages with a non-predefined connection

Push messages

To push messages with a non-predefined Amazon SQS message, follow the steps below:

  1. Create a new message.

  2. From the Connection drop-down menu, select <explicit>.

  3. In the Endpoint field, copy the Amazon Resource Name (ARN) of your selected SQS queue from the AWS console in the Details tab.

  4. In the Action drop-down menu, select Push.

  5. In the Auth tab, select AWS Signature from the Authentication drop-down list and enter Access Key and Secret Key credentials for your AWS account.

  6. Optionally, enter your Session Token in case you have temporary credentials.

  7. Optionally, in case your endpoint does not contain a Region entry, select it from the drop-down menu. The default value is US East (Ohio).

  8. In the Payload field, enter your message.

  9. Click on Run in the API Scan menu to send your message on the queue to the specified queue.

Push action: Auth tab for Amazon SQS message in API Scan

Pull messages

To pull messages with a non-predefined Amazon SQS messages, follow the steps below:

  1. Create a new message.

  2. From the Connection drop-down menu, select <explicit>.

  3. In the Endpoint field, copy the Amazon Resource Name (ARN) of your selected SQS queue from the AWS console in the Details tab.

  4. In the Action drop-down menu, select Pull.

  5. In the Auth tab, choose AWS Signature from the Authentication drop-down list and enter Access Key and Secret Key credentials for your AWS account.

  6. Optionally, enter your Session Token in case you have temporary credentials.

  7. Optionally, in case your endpoint does not contain a Region entry, select it from the drop-down menu. The default value is US East (Ohio).

  8. Click on Run in the API Scan menu to receive your message in the specified queue. Only one message is retrieved at a time. To retrieve multiple messages, create a Loop. See also Amazon SQS Visibility Timeout.

Pull action: Auth tab for Amazon SQS message in API Scan

After running your Amazon SQS messages in API Scan, you can export them to Tosca Commander. This allows you to use the message information to define Module Attributes and verify their values. Depending on what you want to test, you can export the messages as an API TestCase.

Purge a queue

To purge an Amazon SQS queue with a non-predefined Amazon SQS messages, follow the steps below:

  1. From the Connection drop-down menu, select <explicit>.

  2. In the Endpoint field, copy the Amazon Resource Name (ARN) of your selected SQS queue from the AWS console in the Details tab.

  3. In the Action drop-down menu, select Purge.

  4. In the Auth tab, choose AWS Signature from the Authentication drop-down list and enter Access Key and Secret Key credentials for your AWS account.

  5. Optionally, enter your Session Token in case you have temporary credentials.

  6. Optionally, select a Region from the drop-down menu. The default value is US East (Ohio).

  7. Click on Run in the API Scan menu to purge the specified queue. The queue is then cleared of all messages.

Purge action: Auth tab for Amazon SQS message in API Scan