You may want to send messages to a specific email account using SMTP.
- Complete the WSDL test creation wizard as normal (see Creating Tests from a WSDL for details).
- Double-click the node for the test that will be using SMTP.
- In the right GUI panel, select the Transport tab and choose SMTP from the Transport menu.
- Configure the following options:
- From: Specifies the email address from which the message is sent.
- To: Specifies the email address to which the message is sent. For multiple receivers, separate each email address by a comma (for example,
[email protected], [email protected]
). - Subject: Specifies the subject of the email being sent.
- SMTP Headers: You can configure SMTP headers by clicking Add and entering the Name and Value for the header.
Once the test is set up, the email is automatically sent every time the test is run.
It is also proven helpful for SOAtest to alert users via email of specific test failures by combining Test flow logic with a Messaging Client that uses SMTP. To do so:
- Create a Messaging Client by right-clicking on the Test Suite node and choosing Add Test > Standard Test > New Tool > Messaging Client.
- In the Messaging Client tool select SMTP as the transport and enter the receiver’s email information within the Transport Properties.
- In the text area of the Messaging Client enter a message (to alert the users).
- Configure the test flow logic by selecting the test suite node and clicking Test Flow Logic.
- Now create test dependency for the Messaging Client. (for example, run Messaging Client only when Test 2 succeeds)