V
V
vostotskiy2016-04-21 13:19:31
PHP
vostotskiy, 2016-04-21 13:19:31

How to test registration with email verification on Codeception/PhantomJS?

Hello. I do testing for various projects based on Codeception and a self-written framework that displays test results, counts statistics, etc. I
ran into a registration problem when you need to create a user with a unique mail every time.
I decided to use one-time mail services for this purpose. I loaded the page, pulled out the mailbox address, entered it during registration, received a letter to it, followed the link. But there is a problem, I can’t figure out how to work with different windows at the same time in Codeception, I use PhantomJS as an access module. It turns out that I need to simultaneously create a mailbox, keep the connection open and create a new connection to the site with registration in a new tab, then again go to the tab with open mail and check the incoming letter.
Tell me, please, who knows how this can be implemented using Codeception.
Thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2016-04-21
@alexey-m-ukolov

I need to create a mailbox at the same time ... then again go to the tab with open mail and check the incoming letter.
You do not have the task of testing the web interface of the mailer. Work with it via API, you don't need to open anything in the browser. This is not only logical, but also significantly speed up the passage of your tests.
Well, if you start a separate database for tests, then you won’t have to create an account every time: you will start a test account, and after the test is over, you will simply clean the user table.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question