Add performance test support

Created on 2 July 2025, 10 days ago

Problem/Motivation

Drupal core has PerformanceTestTrait.

I'm trying to add performance test coverage to a complex sites/codebase for a client, and they do not currently have custom functional/functionaljs tests or default content, so looked into using DTT and the amount of code to support this is relatively small - would be great to have it as a base class so that other sites can use it.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom catch

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

Merge Requests

Comments & Activities

  • Issue created by @catch
  • Merge request !21Add draft PerformanceTestBase class. β†’ (Merged) created by catch
  • πŸ‡¬πŸ‡§United Kingdom catch

    Put a rough MR up. Haven't looked at adding test coverage in DTT for this yet, but given the tests are tests using the base class it should be straightforward to add one. Would be good to know there aren't major showstoppers otherwise though.

  • Pipeline finished with Failed
    10 days ago
    Total: 150s
    #537239
  • πŸ‡ΊπŸ‡ΈUnited States moshe weitzman Boston, MA

    No objection here. Looks nice and small.

    I'm unsure if the phpunit fails are due to this PR or not. It was working two months ago - https://git.drupalcode.org/project/dtt/-/pipelines

  • Pipeline finished with Canceled
    10 days ago
    Total: 81s
    #537322
  • Pipeline finished with Failed
    10 days ago
    Total: 150s
    #537323
  • Pipeline finished with Failed
    10 days ago
    Total: 154s
    #537326
  • Pipeline finished with Failed
    10 days ago
    Total: 156s
    #537330
  • Pipeline finished with Failed
    10 days ago
    Total: 151s
    #537335
  • Pipeline finished with Failed
    10 days ago
    Total: 156s
    #537347
  • Pipeline finished with Failed
    10 days ago
    Total: 173s
    #537350
  • πŸ‡¬πŸ‡§United Kingdom catch

    I cleaned up various mess in the MR, but phpunit tests are still failing and that's definitely not related to the changes here - see for example https://git.drupalcode.org/issue/dtt-3533690/-/jobs/5754008

    Something wrong with the selenium driver image maybe?

  • πŸ‡ΊπŸ‡ΈUnited States moshe weitzman Boston, MA

    I pushed a few changes. The module_installer in setUp() is get the error Error: Call to undefined method Drupal\Core\ProxyClass\Extension\ModuleInstaller::moduleExists(). So thats commented out for now. The new test passes on my machine. Please confirm that Chrome is doing what its supposed to do.

    Still not sure whats up with Selenium Chrome.

  • Pipeline finished with Failed
    9 days ago
    Total: 152s
    #538580
  • πŸ‡¬πŸ‡§United Kingdom catch

    s. The module_installer in setUp() is get the error Error: Call to undefined method Drupal\Core\ProxyClass\Extension\ModuleInstaller::moduleExists(). So thats commented out for now.

    Just needed to be module_handler instead of module_installer - pushed a commit for that.

    Chrome is working when I run tests on a client project (that client project fails to send all the info to opentelemetry, but it's because too much information is collected in the test).

    I should be able to test the full opentelemetry stack in a couple of weeks hopefully, but worst case it would be a small follow-up, the main thing here is getting the phpunit tests working.

  • πŸ‡ΊπŸ‡ΈUnited States moshe weitzman Boston, MA
  • Pipeline finished with Skipped
    6 days ago
    #540231
Production build 0.71.5 2024