Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

352
Views
How can I acess content of email triggered by a test in Cypress

An email is being sent in my case ( 1. When resetting the password, 2. Adding a New member) during both API and UI tests. How can I access these emails without actually logging into my mail manual and accessing the content, so I can add them to the test and verify?

The test is something like the below.

  1. User can reset the password.
  2. Mail is triggered.
  3. User uses the link in the mail to reset the password.
  4. User logs in again using the new password.

Second test.

  1. Admin adds a member.
  2. Admin adds a new member and gets a mail about confirmation.
  3. verify the mail sent to the new member's email.

Would appreciate any help here.

I have tried to look into the third parties but it seems I need to use their email accounts I was hoping if someone can help me regarding Gmail(accessing the content of emails going to Gmail)

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

  1. If your application is running locally and is sending the emails directly through an SMTP server, you can use a temporary local test SMTP server running inside Cypress. Read the blog post "Testing HTML Emails using Cypress" for details.
  2. If your application is using a 3rd party email service, or you cannot stub the SMTP requests, you can use a test email inbox with an API access. Read the blog post "Full Testing of HTML Emails using SendGrid and Ethereal Accounts" for details.

Taken from the official best practice page at "Verifying sent emails". Read more here.

about 4 years ago · Santiago Trujillo Report

0

If you are looking for a free third-party email client (of course with just 100 emails per month) you can use testmail.app

This app is pretty much basic and easy to integrate with cypress. You can find docs here

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!