Problem/Motivation

In #3074043: Move simpletest.module DB-related functions to TestDatabase, deprecate we're trying to deprecate top-level simpletest module functions by moving them to Drupal\Core\Test\TestDatabase.

It so happens that we can't test many of our changes, because TestDatabase is mostly static and thus can't be mocked.

Proposed resolution

  • Test runners (simpletest.module and run-test.sh) run tests opening TestRun objects that have state and an execution log.
  • TestDatabase objects only cares about setting up the SUT database, not the results logging.
  • Each TestRun object is associated with a TestRunResultsStorageInterface object, which responsibility is to store permanently the state and execution log of each test run. This interface is storage agnostic, implementations could use a database or anything else.
  • SimpletestTestRunResultsStorage is at the moment the only implementation of TestRunResultsStorageInterface, which is using the database and the legacy {simpletest} and {simpletest_test_id} tables for the purpose.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#77 interdiff_74-77.txt1007 bytesmondrake
#77 3075608-77.patch89.19 KBmondrake
#74 interdiff_72-74.txt4.46 KBmondrake
#74 3075608-74.patch89.05 KBmondrake
#72 interdiff_70-72.txt3.32 KBmondrake
#72 3075608-72.patch89.27 KBmondrake
#70 interdiff_66-70.txt1.9 KBmondrake
#70 3075608-70.patch88.22 KBmondrake
#66 3075608-66.patch88.41 KBmondrake
#65 interdiff_64-65.txt2.28 KBmondrake
#65 3075608-65.patch88.52 KBmondrake
#64 interdiff_63-64.txt27.25 KBmondrake
#64 3075608-64.patch88.19 KBmondrake
#63 3075608-63.patch80.77 KBmondrake
#62 3075608-62.patch82.14 KBmondrake
#62 interdiff_60-62.txt798 bytesmondrake
#60 3075608-60.patch81.93 KBmondrake
#58 interdiff_57-58.txt13.17 KBmondrake
#58 3075608-58.patch109.73 KBmondrake
#57 3075608-57.patch103.1 KBmondrake
#57 interdiff_56-57.txt915 bytesmondrake
#56 3075608-54.patch103.1 KBmondrake
#56 interdiff_54-56.txt5.21 KBmondrake
#54 3075608-54.patch105.03 KBmondrake
#54 interdiff_53-54.txt17.83 KBmondrake
#53 interdiff_51-53.txt4.61 KBmondrake
#53 3075608-53.patch93.18 KBmondrake
#51 interdiff_49-51.txt7.41 KBmondrake
#51 3075608-51.patch93.13 KBmondrake
#49 interdiff_47-49.txt15.53 KBmondrake
#49 3075608-49.patch91.41 KBmondrake
#47 interdiff_46-47.txt794 bytesmondrake
#47 3075608-47.patch88.79 KBmondrake
#46 3075608-46.patch88.79 KBmondrake
#46 interdiff_42-46.txt5.41 KBmondrake
#42 3075608-42.patch86.1 KBmondrake
#41 3075608-41.patch84.36 KBmondrake
#41 interdiff_39-41.txt1.92 KBmondrake
#39 3075608-39.patch84.41 KBmondrake
#39 interdiff_38-39.txt5.88 KBmondrake
#38 3075608-38.patch82.67 KBmondrake
#37 interdiff_35-37.txt3.66 KBmondrake
#37 3075608-37.patch82.62 KBmondrake
#35 interdiff_34-35.txt11.42 KBmondrake
#35 3075608-35.patch82.88 KBmondrake
#34 interdiff_31-34.txt13.66 KBmondrake
#34 3075608-34.patch76.81 KBmondrake
#31 3075608-31.patch63.15 KBmondrake
#31 interdiff_30-31.txt556 bytesmondrake
#30 interdiff_29-30.txt16.34 KBmondrake
#30 3075608-30.patch62.89 KBmondrake
#29 interdiff_28-29.txt1.61 KBmondrake
#29 3075608-29.patch55.32 KBmondrake
#28 3075608-28.patch53.93 KBmondrake
#26 interdiff_24-26.txt7.28 KBmondrake
#26 3075608-26.patch53.17 KBmondrake
#25 interdiff_24-25.txt9.19 KBmondrake
#25 3075608-25.patch52.85 KBmondrake
#24 interdiff_23-24.txt844 bytesmondrake
#24 3075608-24.patch49.26 KBmondrake
#23 interdiff_20-23.txt6.46 KBmondrake
#23 3075608-23.patch49.21 KBmondrake
#20 interdiff_18-20.txt522 bytesmondrake
#20 3075608-20.patch44.93 KBmondrake
#18 interdiff_16-18.txt1.35 KBmondrake
#18 3075608-18.patch44.93 KBmondrake
#16 interdiff_12-16.txt33.61 KBmondrake
#16 3075608-16.patch45.04 KBmondrake
#12 3075608-12.patch28.25 KBmondrake
#12 interdiff_11-12.txt7.12 KBmondrake
#11 3075608-11.patch26.54 KBmondrake
#11 interdiff_9-11.txt6.51 KBmondrake
#9 interdiff_7-9.txt975 bytesmondrake
#9 3075608-9.patch23.7 KBmondrake
#7 3075608-7.patch23.45 KBmondrake
#4 3075608-4.patch11.86 KBmondrake
#3 Schermata 2019-08-25 alle 16.00.16.png122.81 KBmondrake

Issue fork drupal-3075608

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Mile23 created an issue. See original summary.

mile23’s picture

mondrake’s picture

Issue summary: View changes
StatusFileSize
new122.81 KB

One things that pops up looking at TestDatabase right now is that it is doing many things in the same class. In particular, it
- sets up the database for the SUT, and
- manages (a part) of the test run where it logs test results, tracks db prefixes, keeps the {simpletest*} schema definitions, etc within the SITE database

The second part, though, it is still all over the place, see the table below to see which classes/scripts are doing what with the {simpletest*} tables:

One initial idea here could be to try and have a class (say TestTracker?) abstracting away the DB implementation details from the consuming code, and providing them a set of necessary methods. This way in the future the structure of the {simpletest*} tables could become totally internal (actually, maybe we won't even need db at the end of the day).

mondrake’s picture

StatusFileSize
new11.86 KB

Here's an initial idea - quite rough, but I thought I share this at this point to get some feedback if this all makes any sense.

In general, with the table {simpletest_test_id} we trace the status of the last db prefix used by a test_id, and with {simpletest} we log the messages of the test execution.

We have already a TestStatus class, even if it has only a static method to map test status codes to some human readble status strings.

If we change that class to become an object that bears the status of a test and of the logged messages, and manage within that class all the interaction with the database, then we can abstract away the DB API calls from consuming code. Here I am only trying with 'insert' and 'update' operations - for 'delete' it's better wait for #2800267: Turn simpletest_clean*() functions into a helper class, and for 'select' wait for #3075648: Refactor TestDatabase::lastTestGet to use dynamic queries, and further feedback here.

Actually, potentially even the schema for creating the tables could be advocated by the class itself, so creating the tables on-demand rather than at simpletest install or by run-test.sh.

mondrake’s picture

Status: Active » Needs review
mondrake’s picture

Assigned: Unassigned » mondrake
mondrake’s picture

Assigned: mondrake » Unassigned
StatusFileSize
new23.45 KB

Update after commit of #3075648: Refactor TestDatabase::lastTestGet to use dynamic queries.

I thought here to add a new TestRun class, instead of expanding TestStatus. The idea is that a TestRun object bears a status and a message log, both being stored in db tables as the test run goes. The object abstracts away all the interaction with the tables. Here doing that for 'select', 'insert' and 'update' DB calls. Leaving out 'delete' ATM while waiting for #2800267: Turn simpletest_clean*() functions into a helper class.

This approach moves along the lines of what @larowlan was suggesting in #3075648-8: Refactor TestDatabase::lastTestGet to use dynamic queries and #3074043-19: Move simpletest.module DB-related functions to TestDatabase, deprecate:

+++ b/core/scripts/run-tests.sh
@@ -758,7 +758,7 @@ function simpletest_script_execute_batch($test_classes) {
+            $db_prefix = TestDatabase::lastTestGet($child['test_id'])['last_prefix'];

@@ -930,7 +931,7 @@ function simpletest_script_cleanup($test_id, $test_class, $exitcode) {
+    (new TestDatabase($db_prefix))->logRead($test_id, $last_test['test_class']);
are we sure we don't want to use a value object here?

since here $db_prefix = TestDatabase::lastTestGet($child['test_id'])['last_prefix'] becomes $test_run->getDatabasePrefix().

Interdiff would not make much sense.

Status: Needs review » Needs work

The last submitted patch, 7: 3075608-7.patch, failed testing. View results

mondrake’s picture

Status: Needs work » Needs review
StatusFileSize
new23.7 KB
new975 bytes

Addressing test failures.

mile23’s picture

Looks pretty good.

Let's do a little analysis here.

The way this currently works is:

  • run-tests.sh forks a process to run the suite from a single PHPUnit test class.
  • That test run produces a JUnit XML report.
  • The JUnit is imported and converted into tabular data.
  • The tabular data is then dumped to the database.
  • run-tests.sh eventually consumes the database to report a pass/fail.

Given this, it makes sense to have a value class that abstracts away the tabular nature of the data, and eventually also understands the things we want from PHPUnit and/or JUnit (such as risky and incomplete and so forth). We have an issue for adding risky and incomplete so let's not do that here, but looking at that issue might be instructive... #2905007: Allow run-tests.sh to report skipped/incomplete PHPUnit tests

We also want the various pieces to be testable in isolation and in various combinations.

So the flow we might wish to see is:

  • PHPUnit tests produce a JUnit XML report.
  • The report is consumed by the value object we're making.
  • The value object is then consumed by a report maker, which can log the results to the database.
  • ..or any other type of report, including one that just stores results in memory, so we can test it.

Assuming the result maker can log in a flexible way, we can then unit test its behavior, and we can also do a more integrative test of the round-trip the JUnit XML takes through this subsystem.

Also, as we move responsibilities away from TestDatabase, it goes back to only giving us a connection to a database. We'll then want callers to get the connection and inject it into the value object, so that we can then mock the connection for testing. That is: The report maker should never use TestDatabase, but the injected Connection object instead, to facilitate mocking.

And hey, we look at the patch and what do we see:

+++ b/core/lib/Drupal/Core/Test/TestRun.php
@@ -0,0 +1,172 @@
+  /**
+   * TestRun constructor.
+   */
+  public function __construct(Connection $connection, $test_id) {
+    $this->connection = $connection;
+    $this->testId = $test_id;
+  }
+
+  /**
+   *
+   */
+  public static function createNew(Connection $connection) {
+    $test_id = $connection->insert('simpletest_test_id')
+      ->useDefaults(['test_id'])
+      ->execute();
+    return new static($connection, $test_id);
+  }

..so we're off to a good start in terms of design thinking. :-)

But I think we should separate concerns and have a value-only results class that consumes JUnit results, and then an abstract report maker, and then a concrete report maker that knows how to write to a Connection with a {simpletest} schema.

This enables us to test, and then also gives us relatively easy options when it comes time to report on risky and incomplete tests.

I'd work on a patch right now but life is in the way.

mondrake’s picture

StatusFileSize
new6.51 KB
new26.54 KB

Doing some better usage of the TestRun object around. Haven't seen #10 yet. @Mile23 feel free to take over anytime, just pls assign to yourself so I know I will have to keep hands away :)

mondrake’s picture

StatusFileSize
new7.12 KB
new28.25 KB

#10 sounds great!

I think we should separate concerns and have a value-only results class that consumes JUnit results, and then an abstract report maker, and then a concrete report maker that knows how to write to a Connection with a {simpletest} schema.

... and another implementation of the concrete report maker that, for example, just writes to memory for testing purposes without any DB interaction, if I understand correctly.

For now, in this patch I am just moving TestDatabase::logRead to a method on TestRun, since AFAICS it belongs there - that method, given a test run, scans the PHP error log file and adds appropriate log entries to the test run. At the end of the game, TestDatabase will only provide methods to setup and provide references for the database for the SUT, so to decouple that from managing the test results.

mile23’s picture

Assigned: Unassigned » mile23
mile23’s picture

Assigned: mile23 » Unassigned
mondrake’s picture

Assigned: Unassigned » mondrake

Assigning, trying to separate TestRun from results storage

mondrake’s picture

Assigned: mondrake » Unassigned
StatusFileSize
new45.04 KB
new33.61 KB

So, here's my next idea.

Test runners (simpletest.module and run-test.sh) run tests opening TestRun objects that have state and an execution log. TestDatabase objects only cares about setting up the SUT database, not the results logging. Each TestRun object is associated with a TestRunResultsStorageInterface object, which responsibility is to store permanently the state and execution log of each test run. This interface is storage agnostic, implementations could use a database or anything else. SimpletestTestRunResultsStorage is at the moment the only implementation of TestRunResultsStorageInterface, which is using the database and the legacy {simpletest} and {simpletest_test_id} tables for the purpose.

Status: Needs review » Needs work

The last submitted patch, 16: 3075608-16.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

mondrake’s picture

Status: Needs work » Needs review
StatusFileSize
new44.93 KB
new1.35 KB

Addressing test failures

Status: Needs review » Needs work

The last submitted patch, 18: 3075608-18.patch, failed testing. View results

mondrake’s picture

Status: Needs work » Needs review
StatusFileSize
new44.93 KB
new522 bytes

Let's see this.

mondrake’s picture

Status: Needs review » Postponed
Related issues: +#2800267: Turn simpletest_clean*() functions into a helper class
mondrake’s picture

Assigned: Unassigned » mondrake
Issue tags: +Needs reroll
mondrake’s picture

Assigned: mondrake » Unassigned
Issue tags: -Needs reroll
StatusFileSize
new49.21 KB
new6.46 KB

Rerolled and moved TestDatabase::processPhpUnitResults to TestRun::processPhpUnitResults

mondrake’s picture

StatusFileSize
new49.26 KB
new844 bytes

Addressing test failure.

mondrake’s picture

StatusFileSize
new52.85 KB
new9.19 KB

Refactoring run-tests.sh to use the new objects.

mondrake’s picture

StatusFileSize
new53.17 KB
new7.28 KB

Patch in #25 is pushing too far.

mondrake’s picture

Assigned: Unassigned » mondrake

#2800267: Turn simpletest_clean*() functions into a helper class is in and this now needs reroll + incorporating into SimpletestTestRunResultsStorage all the db 'delete' operations. Will work on that.

mondrake’s picture

StatusFileSize
new53.93 KB

Just a reroll now.

mondrake’s picture

StatusFileSize
new55.32 KB
new1.61 KB

Addressing failures of #28.

mondrake’s picture

StatusFileSize
new62.89 KB
new16.34 KB

Here with SimpletestTestRunResultsStorage managing *all* interactions with the DB layer, AFAICS. This completes abstraction of the test results storage from the media actually used for it. Did some local testing, let's see what bot thinks.

mondrake’s picture

StatusFileSize
new556 bytes
new63.15 KB

Better.

mondrake’s picture

Assigned: mondrake » Unassigned
Status: Postponed » Needs review

Far from being ready, but I think we can unpostpone now, for review.

mondrake’s picture

Assigned: Unassigned » mondrake
Status: Needs review » Needs work

Working at adding tests for SimpletestTestRunResultsStorage and TestRun.

mondrake’s picture

Assigned: mondrake » Unassigned
Status: Needs work » Needs review
StatusFileSize
new76.81 KB
new13.66 KB

Adding a bunch of tests for SimpletestTestRunResultsStorage and TestRun.

mondrake’s picture

StatusFileSize
new82.88 KB
new11.42 KB

Adjusted TestRun::processPhpErrorLogFile to make it testable and added tests + fixture test error.log file.

I do not like the results of the processing of the error.log file - a results record is added for each line of the file, and that means an entry for each item in the backtrace of the failure. In practice, given the test error.log file I'd expect 2 entries, but actually 9 entries are added. But that is pre-existing behavior, I just reflect it in the test. I'd suggest a follow-up to improve that logic.

Status: Needs review » Needs work

The last submitted patch, 35: 3075608-35.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

mondrake’s picture

Status: Needs work » Needs review
StatusFileSize
new82.62 KB
new3.66 KB
mondrake’s picture

mondrake’s picture

StatusFileSize
new5.88 KB
new84.41 KB

Adding a TestDatabase::getPhpErrorLogPath method to make finding the error.log file reusable and testable, adjusting tests.

Status: Needs review » Needs work

The last submitted patch, 39: 3075608-39.patch, failed testing. View results

mondrake’s picture

Status: Needs work » Needs review
StatusFileSize
new1.92 KB
new84.36 KB

Do we really need the path to be absolute?

mondrake’s picture

StatusFileSize
new86.1 KB

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

mile23’s picture

Patch still applies, re-running test.

mile23’s picture

Repeat of #44.

mondrake’s picture

StatusFileSize
new5.41 KB
new88.79 KB

Adding a test for TestRun::processPhpUnitResults. Would be good to get some feedback about the direction of this patch.

mondrake’s picture

StatusFileSize
new88.79 KB
new794 bytes
mondrake’s picture

Issue summary: View changes

Updated IS with (more or less) what the latest patches are trying to implement.

mondrake’s picture

StatusFileSize
new91.41 KB
new15.53 KB

Some more cleanup+docs

Status: Needs review » Needs work

The last submitted patch, 49: 3075608-49.patch, failed testing. View results

mondrake’s picture

Status: Needs work » Needs review
StatusFileSize
new93.13 KB
new7.41 KB

Status: Needs review » Needs work

The last submitted patch, 51: 3075608-51.patch, failed testing. View results

mondrake’s picture

Status: Needs work » Needs review
StatusFileSize
new93.18 KB
new4.61 KB

Less typehints, they fail on Simpletest.

mondrake’s picture

StatusFileSize
new17.83 KB
new105.03 KB

Moving TestRun::processPhpUnitResults into the PhpUnitTestRunner class.

Status: Needs review » Needs work

The last submitted patch, 54: 3075608-54.patch, failed testing. View results

mondrake’s picture

Status: Needs work » Needs review
StatusFileSize
new5.21 KB
new103.1 KB

Addressing failures of #54.

mondrake’s picture

StatusFileSize
new915 bytes
new103.1 KB
mondrake’s picture

StatusFileSize
new109.73 KB
new13.17 KB
  • Adjusting EnvironmentCleaner to use TestRun objects
  • Deprecating TestSetupTrait::getDatabaseConnection so to channel all interaction to test results storage
  • Simpletest's TestBase::deleteAssert to use test results storage instead of direct db calls
mondrake’s picture

Version: 8.9.x-dev » 9.0.x-dev
Component: simpletest.module » phpunit
mondrake’s picture

Version: 9.0.x-dev » 9.1.x-dev
Related issues: +#3110862: Remove simpletest module from core
StatusFileSize
new81.93 KB

Let's see how this works now after removal of simpletest from core in #3110862: Remove simpletest module from core. Reroll.

I think this becomes 9.1.x material, now.

Status: Needs review » Needs work

The last submitted patch, 60: 3075608-60.patch, failed testing. View results

mondrake’s picture

Status: Needs work » Needs review
StatusFileSize
new798 bytes
new82.14 KB

Reintroducing TestDatabase::testingSchema to stay away from changing Simpletest stub

mondrake’s picture

StatusFileSize
new80.77 KB

Reroll.

mondrake’s picture

StatusFileSize
new88.19 KB
new27.25 KB

Rerolled and adding typehints to functions.

mondrake’s picture

StatusFileSize
new88.52 KB
new2.28 KB
mondrake’s picture

StatusFileSize
new88.41 KB

Rerolled.

longwave’s picture

Status: Needs review » Needs work
Issue tags: +Needs change record

It feels like Simpletest is abandoned, there is no real activity in the contrib module, so if this gets us on the way to removing Simpletest-isms from core then I think it's a good idea.

  1. +++ b/core/lib/Drupal/Core/Test/TestDatabase.php
    @@ -316,117 +153,21 @@ public function logRead($test_id, $test_class) {
    +   * @todo deprecate?
    

    This is considered internal so we could just remove it?

  2. +++ b/core/lib/Drupal/Core/Test/TestSetupTrait.php
    @@ -108,9 +108,15 @@
    +    @trigger_error(__METHOD__ . ' in drupal:x.x.x and is removed from drupal:y.y.y. There is no replacement. See https://www.drupal.org/node/xxx', E_USER_DEPRECATED);
    

    Might as well set these versions and add a change record.

Otherwise I don't see any big issues and I think this is a nice cleanup.

mondrake’s picture

Title: Refactor TestDatabase to be testable » Introduce TestRun objects and refactor TestDatabase to be testable
Assigned: Unassigned » mondrake

Thank you @longwave, I am on it.

mondrake’s picture

mondrake’s picture

Assigned: mondrake » Unassigned
Status: Needs work » Needs review
StatusFileSize
new88.22 KB
new1.9 KB

Addressed #67, thank you.

Status: Needs review » Needs work

The last submitted patch, 70: 3075608-70.patch, failed testing. View results

mondrake’s picture

Status: Needs work » Needs review
StatusFileSize
new89.27 KB
new3.32 KB

Fixes for failures in #70.

longwave’s picture

Status: Needs review » Needs work

A few more real tiny nits now I have gone back for a second look:

  1. +++ b/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php
    @@ -226,19 +226,37 @@ public function runTests($test_id, array $unescaped_test_classnames, &$status =
    +  public function processPhpUnitResults(TestRun $test_run, array $phpunit_results): void {
    +    if (!empty($phpunit_results)) {
    +      foreach ($phpunit_results as $result) {
    

    As we typehint to array the empty check seems useless, foreach over empty array will do nothing anyway.

  2. +++ b/core/lib/Drupal/Core/Test/SimpletestTestRunResultsStorage.php
    @@ -0,0 +1,302 @@
    +   * This method is introduced for BC.
    

    Is this actually needed?

  3. +++ b/core/lib/Drupal/Core/Test/SimpletestTestRunResultsStorage.php
    @@ -0,0 +1,302 @@
    +          'description' => 'Primary Key: Unique simpletest ID used to group test results together. Each time a set of tests
    +                            are run a new test ID is used.',
    

    I don't think we normally break long lines like this.

  4. +++ b/core/scripts/run-tests.sh
    @@ -623,6 +632,15 @@ function simpletest_script_setup_database($new = FALSE) {
    +function script_setup_test_run_results_storage($new = FALSE) {
    

    All other functions in run-tests.sh begin with simpletest_script_ except this one, probably should be consistent.

  5. +++ b/core/scripts/run-tests.sh
    @@ -894,7 +906,7 @@ function simpletest_script_command($test_id, $test_class) {
    -  $command .= " --test-id $test_id";
    +  $command .= " --test-id " . $test_run->id();
    

    This can be single-quoted now.

mondrake’s picture

Status: Needs work » Needs review
StatusFileSize
new89.05 KB
new4.46 KB

#73 all done, thank you.

#73.4 I'd rather do the other way round i.e. replace "simpletest" with "runtests" everywhere but yea, let's do that elsewhere.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Looks great now, thanks! Looking forward to some followups where we remove more references to Simpletest :)

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 74: 3075608-74.patch, failed testing. View results

mondrake’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new89.19 KB
new1007 bytes

Rerolled

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

mondrake’s picture

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

spokje’s picture

Status: Reviewed & tested by the community » Needs work

@mondrake

I think we need to rebase the MR on 9.3.x.
(And by we, I of course mean: you, because only the original creator of an MR can do so 😇)

mondrake’s picture

After sitting for 9 months in RTBC with no action, I'm not sure where this issue is going, really. But OK, rebasing.

mondrake’s picture

Status: Needs work » Needs review
spokje’s picture

Status: Needs review » Reviewed & tested by the community

I hear what you're saying there and I was kinda hoping a rebase would get this one in quicker.

Thanks :)

Back to RTBC per #75, trusting TestBot to kick it down when it's not returning green.

mondrake’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

This issue has been sitting in RTBC for over one year with no sign of interest from committers. I assume won't fix, if nothing else to avoid rerolling it to no avail.

mondrake’s picture

Assigned: Unassigned » mondrake
Status: Closed (won't fix) » Needs work

Discussed with @longwave in Slack it's worth giving this another try. I will rebase this onto 10.1.x.

mondrake’s picture

Assigned: mondrake » Unassigned
Status: Needs work » Needs review

Rebased onto 10.1.x

mondrake’s picture

Version: 9.3.x-dev » 10.1.x-dev
longwave’s picture

A couple of questions/comments - I am OK if you want to defer further changes to followups, getting this testable means we can refactor and untangle the Simpletest-isms more easily.

mondrake’s picture

Please see comments inline the MR.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks - this looks OK to me and will mean that we can start removing more dead code related to Simpletest in followups.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

I've stared at this issue lots of times and little bits of it make me feel "are we sure that we need to do this or that" - for example I'm not sure about the utility of having an interface for TestRunResultsStorageInterface - I get that internally we're going to swap it for a non-simpletest labelled implementation at some point in the future but it feel unnecessary. That said, I'm not sure that these objections are that important or should stand in the way of progress here. I don't think we should consider any of this public API and the MR helpfully adds @internal in quite a few places. Therefore I think we should proceed here with a commit.

Committed f711435 and pushed to 10.1.x. Thanks!

  • alexpott committed f7114354 on 10.1.x
    Issue #3075608 by mondrake, Mile23, longwave: Introduce TestRun objects...

mondrake’s picture

Thanks. BTW, there's a bit of Space Oddity in Drupal's code, now :)

Status: Fixed » Closed (fixed)

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