Forum Discussion
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.
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.
- MrX6 years agoNew Contributor
What you are saying is correct but it will achieve only a positive scenario. I also need to check that if an email has not received by the unexpected recipient. Hence to achieve that I am thinking to do it in a reverse way i.e. read the excel and open the mailbox of email1@test.com verify that expected all emails are present then verify if there are any more emails. If yes, then log the subject line of such emails. Then go back and take another mailbox and do the same thing. This way I can identify that if an email has exchanged between email ids.
What's your opinion.
Related Content
- 4 years agoCapricornus
Recent Discussions
- 2 hours agoSlickRick
- 3 hours agoSlickRick
Name Mapping Issue
Solved5 hours agokgreger1