Use one-time login link instead of user login form in BrowserTestBase tests

Created on 20 August 2024, 30 days ago
Updated 18 September 2024, 1 day ago

Problem/Motivation

A test that creates a user and logs in will issue 3 HTTP requests:

  • GET to the login form
  • POST to submit the login form
  • GET to the user profile page

$this->drupalLogin is called thousands of times. This leads to a significant number of HTTP requests.

Instead, we can use the one-time login link, and reduce this to 2 HTTP requests per login:

  • GET to the one-time login path
  • GET to the user profile page

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Feature request
Status

Fixed

Version

11.0 🔥

Component
PHPUnit 

Last updated 11 minutes ago

Created by

🇦🇺Australia mstrelan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024