function OpenTelemetryFrontPagePerformanceTest::testFrontPageColdCache

Same name in other branches
  1. 11.x core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php \Drupal\Tests\demo_umami\FunctionalJavascript\OpenTelemetryFrontPagePerformanceTest::testFrontPageColdCache()

Logs front page tracing data with a cold cache.

1 call to OpenTelemetryFrontPagePerformanceTest::testFrontPageColdCache()
OpenTelemetryFrontPagePerformanceTest::testFrontPagePerformance in core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php
Tests performance of the Umami demo front page.

File

core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php, line 36

Class

OpenTelemetryFrontPagePerformanceTest
Tests demo_umami profile performance.

Namespace

Drupal\Tests\demo_umami\FunctionalJavascript

Code

protected function testFrontPageColdCache() : void {
    // @todo Chromedriver doesn't collect tracing performance logs for the very
    //   first request in a test, so warm it up.
    //   https://www.drupal.org/project/drupal/issues/3379750
    $this->drupalGet('user/login');
    $this->rebuildAll();
    $this->collectPerformanceData(function () {
        $this->drupalGet('<front>');
    }, 'umamiFrontPageColdCache');
    $this->assertSession()
        ->pageTextContains('Umami');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.