Ensure that links to failed test HTML artifacts point to a useful host URL rather than localhost

Created on 29 October 2024, about 2 months ago

Problem/Motivation

Failed tests on the CI currently have an HTML output of http://localhost/subdirectory/, which isn't very useful and requires manually browsing the job artifacts to find the exact artifact amongst a list of potentially 100s of files.

Steps to reproduce

Trigger any functional Gitlab CI test failure - e.g. https://git.drupalcode.org/issue/drupal-2643466/-/jobs/3194379#L1461

Proposed resolution

We can potentially make use of something along the lines of the BROWSERTEST_OUTPUT_BASE_URL environment variable such that previous URLs like:

http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-84-62146223.html

is outputted as:

https://git.drupalcode.org/issue/drupal-3481725/-/jobs/3089996/artifacts/external_file/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-84-62146223.html

or:

https://issue.pages.drupalcode.org/-/drupal-3481725/-/jobs/3089996/artifacts/sites/simpletest/browser_output/Drupal_Tests_ckeditor5_FunctionalJavascript_ImageUrlTest-84-62146223.html

Remaining tasks

Update default environment variables to replace the HTML output URLs.

User interface changes

N/A

📌 Task
Status

Active

Component

gitlab-ci

Created by

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

Comments & Activities

  • Issue created by @codebymikey
  • 🇪🇸Spain fjgarlin

    That's the result of the verbose output when running core/scripts/run-tests.sh. So, if there is any change to that output, this would need to be a core issue.

    I guess that variable could be calculated right before calling the scripts so it has a "good" link.

    I'm going to move to the core issue queue to get feedback from core committers. Contrib would benefit from this, if implemented, but I want to hear from them first.

Production build 0.71.5 2024