Problem/Motivation

If an UpdatePathTestBase-based test fails due to an error that occured while running the update, the test fails with the following message:

Behat\Mink\Exception\ExpectationException: The string "Failed:" appears in the HTML response of this page, but it should not.

That is not very helpful, it gives absolutely no clue why the update failed, even though that is visible on the update results page, right after the "Failed:" string.

Proposed resolution

Actually fetch the message from the output and use it as the test failure message.

This leads to the following message, for example:

The update failed with the following message: "Failed: Drupal\Core\Entity\EntityStorageException: Exception thrown while performing a schema update. The 'langcode' field specification does not define 'not null' as TRUE. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1480 of /Users/tobias.stoeckler/workspace/d8/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php)."

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tstoeckler created an issue. See original summary.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

That's so much nicer! Great idea

  • larowlan committed 7b00141 on 8.7.x
    Issue #3002604 by tstoeckler: Improve debuggability of update failures...

  • larowlan committed 03635b9 on 8.6.x
    Issue #3002604 by tstoeckler: Improve debuggability of update failures...
larowlan’s picture

Version: 8.7.x-dev » 8.6.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 7b00141 and pushed to 8.7.x. Thanks!

c/p as 03635b9b38 to 8.6.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.