Supported messaging patterns for email resources

You can find information about the supported messaging patterns that you can use in your tests for email resources, which you set up in an HCL OneTest API project.

Supported messaging actions

The following messaging actions are supported for email resources:
  • Request/Reply
  • Publish/Subscribe
  • Publish
  • Subscribe

Configuring messages

In HCL OneTest API tests, the email transport can be used as an external notification system that delivers pertinent information such as exceptions or test status to interested members by using email.

The standard field options (filtering, validation, tag storage) are available when you use any of the messaging actions with the email transport. See Messages.

When you attach non-text items such as an image to a message that you are publishing, you must take the following action:
  • Convert the attachment as a Multipurpose Internet Mail Extensions (MIME) attachment, set the format as Binary, and select the Import file contents now option at the time of attachment.
  • Provide the file name of the attachment in the Content-Description parameter as a child of the message node in the Message panel.Image of the message configuration panel
If you want to use any specific character encoding in the Headers or Body of the message, you must take the following actions:
  • Convert the message into a multipart MIME message.
  • Specify the value for the Content-Type header as a child of the message node in the Message panel with the value as text/plain; charset=<character_set>. For example, you could specify text/plain; charset=us-ascii.
    Note: If no <character_set> is specified for the Content-Type parameter, the default value that is assigned to the charset attribute is UTF-8. The UTF-8 character set supports most of the written character sets.
    You must specify the character-set parameter for all child nodes where you intend to use the characters, such as the child nodes for the Subject, Header, or Body.
    Image of the message configuration panel

Creating tests for testing the email transport

You can create tests in the Test Factory view that use the email transport.

Find information about the following tasks for tests that use the different MEP: