Email Testing - best way to spoof an inbox and check content/click links

Hi all,

I am looking to change the way I test emails.
At present im tetsing using gmail and going through the UI. Go to web app, log in, read emails and click links. All done via the UI as if a person was.

This works but is slow and with gmail enforcing 2FA no longer the most secure way.

Does anyone use any external providers i.e. mailtrap or mailslurp?

What I am aiming to test:
• Receiving sign up emails and clicking links (forgotten password etc).
• Checking content of emails is correct.
• Check one time only links expire after clicked

I do not need to test gmail functionality but the above content and to click links set out etc.
Best option i can see is to spoof an inbox have mail delivered, get content, chcek content then delete inbox.

I would prefer a static email address as user use this for logging in so a new emaileach time would require setting up a new user which would increase test time.

Any help would be appreciated.

Thanks,

Phil

1 Like

Why spoof email, when you can just use and set up test email ?

Also, why use the UI to access Gmail? You can access that shit programmatically!

Set up your test email, and I can guide you through accessing its messages and threads programmatically, for testing… (WARNING: it is going to be a lengthy process, mostly of API-related configuration)

Please get API credentials from Dev Team and reuse the same for reading/writing emails etc instead of using UI

2 Likes

Hi, I’d be interested to get GMail API running. I had assumed that Google would stop any attempt to automate their mail accounts, as they’ve done with the UI (stoppping webdriver from accessing accounts). Is the link you shared enough to get started or are there Katalon-hurdles to avoid? Cheers

I’m about to make a post on this later on today… Stay tuned

UPDATE: I’ma drop the post tomorrow…

It’s really involved…

Once it’s done, I will link it on here…

The blog post is live!

Let me know if you have any questions !

4 Likes

Thanks for the reply and the blog post looks excellent.

I will get it all set up today and then mark this as a solution.

Thanks again everyone!

1 Like

Hey there, tackling Gmail automation for testing can be tricky due to Google’s restrictions on automating their services.

1 Like

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.

Thanks!

Using the Gmail API could potentially circumvent these issues compare to UI automation, but it’s important to handle it carefully to avoid any hurdles specific to Katalon Studio integration. The link provided should give you a solid starting point, but be prepared for potential challenges along the way, especially with security measures like 2FA. Regarding testing email functionalities more efficiently, services like MailTrap or MailSlurp offer great solutions for creating and managing test email environments without impacting real user accounts. For verifying email addresses easily, you might find https://mailtester.ninja/ helpful.

1 Like