Forum Discussion
What tool are you using to achieve this?
Anyways, the flow would be -
Do you have a test step to send an email to the recipient mailbox? I'm hoping that you, what you need to do it, run that step first to send the email, then create a step to login or view recipient's mailbox. Once in the mailbox, you can have a groovy script to search and match sent email subject against the subject in mailbox.
This can be achieved on SoapUI.
An application has sent the emails we don't need to worry about it. I need to validate that by accessing the number of mailboxes say around 100+. So should verify that on the mail server? or any other way?
I need to provide the solution using a TestComplete tool.
- jhanzeb16 years agoFrequent Contributor
Sorry I've not used TestComplete, though I've done a similar journey in SoapUI.
The flow I used was - Login to the recipient's email (REST Request), once logged in, use the sessionID in the next request to access the user's mailbox and get all emails. Store all emails in a variable, from that variable search for the specific email and have if/else statement, if found --> goTo report props and update, else fail the test.
I hope it helps you.
- MrX6 years agoNew Contributor
Yes, what you are saying is correct. I tried this for outlook using MAPI protocol and for Gmail I tried with JavaMail using IMAP. These both solution works, however, I need to search specific email in multiple recipient's inboxes, say 300+. So what's the approach I should take as we could not configure these many email id s in outlook 2010.
- jhanzeb16 years agoFrequent Contributor
Hi,
So just to have same understanding, you would like to search in 300+ email inboxes? If that's the case, what you can do is - use a technique called data-drive.
Basically, create a table in database or excel or anywhere to hold those email addresses. i.e
Email | Password
email1@test.com | Password1
email2@test.com | Password1
email3@test.com | Password1
Then you call those emails in your login step and use email1@test.com to login, search for specific email address and validate and logout, create a loop to go back to the first step (login), but this time you login with email2@test.com and use the same flow, find that email, validate and then next row.. etc..
You can even have the list of emails in a variable within your application or db or any data holder as long as you can call and use it in your test step.
Hope it helps.
Related Content
- 4 years agoCapricornus