How to read emails with Jmeter - (Mail Reader Sampler) | QAProvider.com
Subscribe me on new discussions

How to read emails with Jmeter - (Mail Reader Sampler)

Views: 39

Today we will learn 

——————————————————————————————————

 1. Setup Mail Reader Sampler 

 2. How to read emails with Jmeter

______________________________________________________________________________

Step 1 : Configure JavaMail & Create Test Plan & Add Thread Group

  • I have discussed about how to configure JavaMail , click here to see my last tutorial.
  • To add Thread Group , click here to see my tutorial on how to create Thread Group

Step 2 : Add Mail Reader Sampler

The Mail Reader Sampler can read (and optionally delete) mail messages using POP3(S) or IMAP(S) protocols. For gmail the incoming mail server is

To add Mail Reader Sampler [Thread Group->Add->Sampler->Mail Reader sampler]

  • Server Type : The protocol used by the provider: e.g. pop3, pop3s, imap, imaps. or another string representing the server protocol. For example file for use with the read-only mail file provider. The actual provider names for POP3 and IMAP are pop3 and imap.
  • Server : Hostname or IP address of the server. See below for use with file protocol
  • Port : Port to be used to connect to the server.
  • Username : User login name.
  • Password : User login password (N.B. this is stored unencrypted in the test plan).
  • Folder : The IMAP(S) folder to use. See below for use with file protocol.
  • I just want to test, so I have selected only 2 mails. You can select all or any number of messages you want. The messages will be fetched according to the date(Old to new).

Step 4 : Add Listener to validate the test

Just add a simple listener Results Tree to check the result [Thread Group->Add->Listener->View Results Tree] & run the test.

We can see that the sender's details & the message subject is captured here.

Here is the message body.

This is how we can use JMeter to read emails. Hope you will find this useful.

Thank You

Karma: {{ total }}
John Mark at 2019-10-06 12:25:02
Karma: {{ total }}

Hi raja. I would like to ask if you have any email address or anything that can contact you. I would like to ask you a couple of questions regarding JMeter for I am currently using this in my company and I want to learn more about JMeter. I would be glad if you can respond to this comment. Thank you Raja.

Raja replied to John Mark's comment at 2019-10-06 15:04:33
Karma: {{ total }}

Hi, you can contact me on rajapal31235@gmail.com