- Issue created by @tanc
- Status changed to Postponed: needs info
about 2 years ago 2:01pm 6 June 2023 - 🇺🇸United States drumm NY, US
What is the URL the screenshot was taken from?
- 🇮🇹Italy tanc Italy
- Status changed to Active
about 2 years ago 4:35pm 6 June 2023 - 🇺🇸United States drumm NY, US
Looks like this is generated by Drupal https://git.drupalcode.org/project/drupal/-/blob/11.x/core/tests/Drupal/...
- 🇬🇧United Kingdom jonathan1055
Hi liam morland,
Yes I confirm that the links with localhost are still shown in the Contrib test logs, but I am not sure that the printed output can be altered within Gitlab Templates. Or maybe it can, we will investigate.In the meantime, you can go to 'artifacts' on the right and browse or download to see the generated .html files.
- 🇬🇧United Kingdom jonathan1055
It's all changed in the last two years anyway, because the link @drumm gave in #4 now produces
"core/tests/Drupal/Tests/Listeners/HtmlOutputPrinterTrait.php" did not exist on "11.x"
- 🇪🇸Spain fjgarlin
Yeah, the output from run-tests.sh is the URL given in
SIMPLETEST_BASE_URL
, which ishttp://localhost/web
in most cases (this line).The tests can be run locally, on GitLab CI, on a jenkins server (as before) or any other system, so we cannot give that script the final GitLab pages URL (eg: https://project.pages.drupalcode.org/-/keycdn/-/jobs/5521834/artifacts/).
Having said that, something that we could try is to run the
run-tests.sh
command and capture the outputcommand > output.log
, and then run ased
command on that output to replacehttp://localhost/
withhttps://project.pages.drupalcode.org/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/
and then show that file as output.The question about this approach is whether we will get real-time feedback, as we do now vs needing to wait for the full run and then dump it all in one go. This wouldn't be a good user experience in my opinion.
We can try doing it and see how far we get or we could even make a variable to get this behaviour (or use PHPUNIT_EXTRA to pass that option).