Creating physical resources for logical email resources

In HCL OneTest API, creating a physical resource for a logical connection involves configuring the physical resource. You must configure the details of the SMTP server (for sending messages) and the IMAP server (for receiving messages).

Before you begin

You must have completed the following tasks:

About this task

You can configure the settings of the physical resource for a logical email resource from the Physical View or from Step 3 if the New Email Server dialog is displayed to you in the Logical View.

You must configure the SMTP mail server that is used to send messages and the IMAP mail server that is used to receive messages. You must provide the ports that the servers use for sending or receiving messages. You must also provide the credentials for the email account that is used in the messaging actions in tests.

Procedure

  1. Open the Physical View of the Architecture School perspective.
  2. Click Email > Email on the toolbar.

    The New Email Server dialog is displayed with the Config tab open.

  3. Enter a name for the email server connection in the Name field.
    Note: Assigning a name can help you to identify the email server if there are multiple email servers in your project.
  4. Click Settings and configure the basic settings for the email servers, based on the description in the following table:
    Table 1. Email Server: Settings tab
    Option Description
    SMTP Host

    The hostname or the IP address of the email server that is used for sending messages.

    For example, the hostname of the SMTP server for the Gmail server can be: smtp.gmail.com

    Port

    The port on the SMTP server that is used for sending messages.

    For example, the SMTP port of the Gmail server can be: 465

    IMAP Host

    The hostname or the IP address of the email server that is used for receiving or subscribe to messages.

    For example, the hostname of the IMAP server for the Gmail server can be: imap.gmail.com

    Port

    The port on the IMAP server that is used for subscribing or receiving messages.

    For example, the IMAP port of the Gmail server can be: 993

    Username The user credential of the email account that you are configuring.
    Password The password credential of the email account that you are configuring.
    Email Folder The folder in the email account that you want to use to receive or subscribe to messages.
  5. Click SSL Settings and configure the secure socket layer (SSL) settings for the email server based on the description in the following table:
    Table 2. SSL Settings
    Setting Description

    Use SSL

    Select this check box to enable security for the communications. When you select this check box, the other controls on the SSL Settings tab are made available for selection.

    Server certificates to trust

    Select one of the following menu items:
    Option Description
    Trust All Accepts any certificates presented by the server, regardless of its validity. This option is the default option and assumes that you are focused on testing an application rather than the security of the server.
    New Defines a new identity store.
    After you define the identity stores, the available identity stores are displayed on the list.

    Client identities to give to server

    Select one of the following menu items:
    Option Description
    None If the server does not request an identity.
    New To define a new identity store.
    After you define the identity stores, the available identity stores are displayed on the list.
    Note: If you are testing with the Gmail servers, you might have to set the security settings for each of the Gmail accounts to accept connections from less secured applications.
  6. Click Test Transport to verify that the connection works.
  7. Click OK.

Results

The email server is added as a physical resource in your project.

What to do next

You must add a service component in the Logical View. See Creating a service component.