Multi-user flows

Collect prospective customer email with HubSpot

Sales tech
Problem types
Multi-user workflows
Email and SMS

This test executes an end-to-end workflow with two separate users. In it, a Hubspot admin creates a new landing page, adds an email collection form, and sets up triggers when the form is completed. A second user then visits the live landing page and submits their personal information. Email confirmations are sent to both the Hubspot admin and the user, and the workflow concludes by verifying the information submitted on the form was successfully recorded in the Hubspot.

How it's done

Managing multiple users

Using Playwright instead of Cypress or Selenium lets our test runner open multiple user sessions. Each session runs in an incognito browser so there aren’t any shared cookies, and the framework lets the runner switch between them throughout the test so that we can assert results as the two users interact.

Email parsing

Our test runner connects to an internal email handler. We poll for the email, but frequently have to include delays in our test code because emails are finicky and might get delayed during a test run. 

Once the email arrives, the runner parses the HTML and asserts that the subject line (in this case) is the one we expect to receive.

See also

We use cookies to
improve your experience.