Problem/Motivation

In #3057420: [meta] How to deprecate Simpletest with minimal disruption we are contemplating making simpletest a contrib module.

That issue has many steps involved in decoupling run-tests.sh (the test runner) from simpletest module. This issue is one of those steps.

Note that run-tests.sh can already be run without the simpletest module installed in a site: https://www.drupal.org/docs/8/phpunit/running-tests-through-command-line...

Scope of this issue

h

The scope of this issue is to decouple run-tests.sh from the simpletest module. This will allow current behavior from run-tests.sh even if the simpletest module itself is removed from the codebase. As a child issue of #3057420: [meta] How to deprecate Simpletest with minimal disruption, we wish to do this with minimal disruption.

Some proof of concept for removing the simpletest module is occurring in #3075490-28: Move simpletest module to contrib

Things we’ll need to solve

run-tests.sh uses logic like this in order to figure out how to run tests it discovers:

          foreach ($matches[1] as $class_name) {
            $namespace_class = $namespace . '\\' . $class_name;
            if (is_subclass_of($namespace_class, '\Drupal\simpletest\TestBase') || is_subclass_of($namespace_class, TestCase::class)) {
              $test_list[] = $namespace_class;
            }
          }

We want to make \Drupal\simpletest\TestBase a soft dependency, so that run-tests.sh can operate completely independently of the simpletest module.

Proposed resolution

Remove code-based assumptions from run-tests.sh that there are two types of tests, and if a test class is not a PHPUnit test, then it must be a simpletest-based one.

Deprecate simpletest_script_open_browser() and --browser option in Drupal 8 and remove this in Drupal 9. All the internal functionality of simpletest_script_open_browser() is moved to simpletest.module as it is completely dependent on it.

Recommend using --verbose instead of --browser in the deprecation message. --verbose already provides links to stored HTML output, it just doesn't open the browser for you.

Remaining tasks

Other remaining issues from #3057420: [meta] How to deprecate Simpletest with minimal disruption

Eventually remove the simpletest module #3075490: Move simpletest module to contrib

User interface changes

None

API changes

simpletest_script_open_browser() is deprecated.

Data model changes

None

Release notes snippet

The --browser option in run-tests.sh has been deprecated in favor of --verbose.

CommentFileSizeAuthor
#76 3074433-3-76.patch11.83 KBalexpott
#76 74-76-interdiff.txt2.5 KBalexpott
#74 3074433-3-74.patch11.65 KBalexpott
#74 71-74-interdiff.txt704 bytesalexpott
#71 3074433-3-71.patch11.65 KBalexpott
#71 66-71-interdiff.txt16.56 KBalexpott
#66 3074433-66.patch11.53 KBmondrake
#66 interdiff_62-66.txt1.03 KBmondrake
#62 3074433-59.patch11.65 KBmondrake
#60 Screenshot 2019-09-28 at 10.14.35.png954.2 KBalexpott
#55 interdiff.txt698 bytesMile23
#55 3074433_55.patch19.03 KBMile23
#53 3074433-53.patch7.04 KBalexpott
#53 52-53-interdiff.txt41.41 KBalexpott
#53 success-phpunit.png354.74 KBalexpott
#53 fail-phpunit.png308.81 KBalexpott
#53 simpletest.png1.09 MBalexpott
#52 interdiff.txt2.65 KBMile23
#52 3074433_52.patch44.12 KBMile23
#48 interdiff.txt721 bytesMile23
#48 3074433_48.patch6.7 KBMile23
#47 interdiff.txt4.57 KBMile23
#47 3074433_47.patch6.7 KBMile23
#44 Screen Shot 2019-09-27 at 7.34.01 am.png103.3 KBlarowlan
#43 3074433-42.patch8.79 KBlarowlan
#43 interdiff-3074433-42.txt4.05 KBlarowlan
#39 interdiff.txt21.22 KBMile23
#39 3074433_39.patch6.3 KBMile23
#37 interdiff.txt856 bytesMile23
#37 3074433_37.patch18.51 KBMile23
#35 interdiff.txt1.8 KBMile23
#35 3074433_35.patch17.68 KBMile23
#29 Screenshot 2019-09-20 at 17.53.30.png1.44 MBLendude
#24 3074433_24.patch16.04 KBMile23
#19 3074433_19.patch15.99 KBMile23
#17 3074433_17.patch15.94 KBMile23
#16 interdiff.txt5.09 KBMile23
#16 3074433_16.patch16.43 KBMile23
#14 interdiff.txt3.09 KBMile23
#14 3074433_14.patch15.1 KBMile23
#12 interdiff.txt3.46 KBMile23
#12 3074433_12.patch14.89 KBMile23
#8 interdiff.txt802 bytesMile23
#8 3074433_8.patch12.56 KBMile23
#4 3074433_4.patch12.56 KBMile23
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mile23 created an issue. See original summary.

Mile23’s picture

Status: Active » Postponed
Mile23’s picture

Issue summary: View changes
Mile23’s picture

Status: Postponed » Needs review
Issue tags: +Needs followup
Related issues: +#2863055: Move TestDiscovery out of simpletest module, minimize dependencies
FileSize
12.56 KB

Still waiting on #3057420: [meta] How to deprecate Simpletest with minimal disruption, but here's a patch. Change back to postponed after this test run.

Note that we're also soft-blocked here by #2863055: Move TestDiscovery out of simpletest module, minimize dependencies because the form builder uses the test_discovery service.

We'll also need to modify TestDiscovery to allow for the non-existence of Drupal\simpletest\TestBase, but that can be a follow-up.

Mile23’s picture

Status: Needs review » Postponed

Setting back to postponed.

Mile23’s picture

Status: Postponed » Needs review
voleger’s picture

All changes looks good for me, but found the following one:

+++ b/core/lib/Drupal/Core/Test/RunTests/RunTestsResultsBuilder.php
@@ -0,0 +1,173 @@
+        $group_summary['#' . $assertion->status] ++;
+        $form['result']['summary']['#' . $assertion->status] ++;

Should be there a space before unary operator statement?

Mile23’s picture

Thanks, @voleger.

Fixed CS from #7.

voleger’s picture

Status: Needs review » Reviewed & tested by the community

Great!
+1 for rtbc

Mile23’s picture

Committing this will require a reroll in #2863055: Move TestDiscovery out of simpletest module, minimize dependencies (or vice-versa). See #4. Totally OK with either way. :-)

Mile23’s picture

Assigned: Unassigned » Mile23
Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Needs reroll after #2863055: Move TestDiscovery out of simpletest module, minimize dependencies

Also needs some love when it comes to the display-oriented functions in simpletest.module:

  • template_preprocess_simpletest_result_summary()
  • _simpletest_build_summary_line()

Also _simpletest_format_summary_line() is dead code.

Mile23’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
14.89 KB
3.46 KB

Copies simpletest's result summary twig template to be an #inline_template in RunTestsResultsBuilder.

We leave the theming functions and template behind because they're also used by the UI batch runner, where they'll live in contrib or be removed in that process.

Removes _simpletest_format_summary_line() which is a) dead code and b) internal due to prefix underscore.

Status: Needs review » Needs work

The last submitted patch, 12: 3074433_12.patch, failed testing. View results

Mile23’s picture

Assigned: Mile23 » Unassigned
Status: Needs work » Needs review
FileSize
15.1 KB
3.09 KB

...in which I learn some twig so that the testception of SimpleTestTest can pass.

Status: Needs review » Needs work

The last submitted patch, 14: 3074433_14.patch, failed testing. View results

Mile23’s picture

Status: Needs work » Needs review
Issue tags: +run-tests.sh
FileSize
16.43 KB
5.09 KB

So the fails in #14 are really hard to track down. The fail is SimpletestUiTest, which runs three tests through the UI form: kernel, unit, and functional.

The kernel test passes, but the unit and functional test don't, because the twig template renders differently in those two for some reason. I think there's probably a service container mixup at some point in those frameworks.

So therefore Twig's {% trans %}{% plural %}{% endtrans %} pattern won't help us pass tests even though it's really the best solution. So we refactor _simpletest_build_summary_line() to be used by RunTestsResultsBuilder.

This new theming code is not used by the batch runner, but is used by the UI results form. Converting the batch runner is out of scope here since our focus is run-tests.sh, but I added a @todo.

Marked RunTestsResultsBuilder as @internal. We can un-@internal whatever parts we need as a stable API for contrib simpletest module in #3075490: Move simpletest module to contrib.

Mile23’s picture

Needed a reroll.

Mile23’s picture

Priority: Normal » Critical
Mile23’s picture

Status: Needs review » Needs work

The last submitted patch, 19: 3074433_19.patch, failed testing. View results

Mile23’s picture

Status: Needs work » Needs review

Reran tests after spurious fail.

Mile23’s picture

Status: Needs review » Postponed

Postponed on some refactoring occurring in #2913819: run-tests.sh ignores final classes

catch’s picture

Status: Postponed » Needs review
Mile23’s picture

Mile23’s picture

Issue tags: -Needs followup

The NF tag here is from #4 and refers to modifying TestDiscovery so that it doesn't have a hard dependency on TestBase/WebTestBase. As it turns out, TestDiscovery deduces that if a test class doesn't belong to a suite, it's a simpletest test, so it doesn't have that hard dependency.

It does, however, parse out and handle @requires annotations for simpletest tests, with a @todo for #1273478: Implement @requires and @dependencies within TestBase, mark tests as skipped

That issue is not required in order to deprecate the simpletest module, which is our mission here as part of #3057420: [meta] How to deprecate Simpletest with minimal disruption

Wim Leers’s picture

The code changes look reasonable: run-tests.sh is changed minimally, and some logic is moved out of a form into a @internal helper class.

This is what I wanted to write: I tested this manually. For the first time ever, I can do a fresh D8 install, run run-tests.sh, without having to install the simpletest module. I must've run into that hundreds of times over the past decade, so it's wonderful to finally have that fixed! 🥳

But … the reality is that this patch doesn't seem to work for me, or I misunderstood the purpose:

wim.leers at Acquia in ~/Work/d8 on 8.8.x*
$ php core/scripts/run-tests.sh --directory modules/jsonapi_hypermedia
  ERROR: Missing Simpletest database schema. Either install Simpletest module or use the --sqlite parameter.

What am I missing?

mondrake’s picture

#26 have not tried myself, but if simpletest is not installed, then its db schema is not available. This is where the test run results are stored, and that is a must have, one way or another. The 'another' in this case would be to instruct run-tests.sh to create a separate SQLite database through the --sqlite option, and results will be stored in that db. This is AFAICS what the testbot on DrupalCI is doing. If you want a sneak peek to the future, #3075608: Introduce TestRun objects and refactor TestDatabase to be testable :)

Wim Leers’s picture

Aha, so I misunderstood the scope and intent of this patch — my bad!

Lendude’s picture

Well if that is the scope of this issue, then the title should probably be something like:
'Allow run-tests.sh to run with --sqlite when Simpletest module is not present'

I think that would be a great first step but it would be better is you could also run it with a mysql database without the Simpletest module. I took a quick look at what that would take, and getting the tests to run is pretty easy

  if ($new && $sqlite) {
    foreach (TestDatabase::testingSchema() as $name => $table_spec) {
      try {

can be changed to

  if ($new) {
    foreach (TestDatabase::testingSchema() as $name => $table_spec) {
      try {

and the tests will run with mysql without Simpletest. The problem is clean up. With just that change, you will be stuck with simpletest tables without a way to get rid of them. Didn't immediately see a way to clean them up, the sqlite file isn't cleaned up either.

But the main thing I wanted to test is that the result printer still worked with the --browser option and simpletest disabled, and it does.

edit: wanted to make it clear that scoping this to just --sqlite seems fine to me!

Mile23’s picture

Thanks for the reviews, everyone.

So the scope of this issue is to make it so you can remove the simpletest module from core, and run-tests.sh will still work as it did before. If you check out #3075490-28: Move simpletest module to contrib, that patch actually removes the simpletest module after applying this patch, and it passes drupalci.

The trick is the 'as it did before' part. You can already use the --sqlite parameter and run-tests.sh will set up a results database using SQLite, so that you don't have to have the simpletest module enabled, or even have a host site.

There's some documentation about it: https://www.drupal.org/docs/8/phpunit/running-tests-through-command-line...

I'll update IS later.

@lendude: We're refactoring a lot of that stuff in #3075608: Introduce TestRun objects and refactor TestDatabase to be testable. This issue and the others from its parent have a more limited scope about being able to remove the simpletest module from core. I say 'we,' it's mostly @mondrake. :-)

Mile23’s picture

Title: Allow run-tests.sh to run when simpletest module is not present » Decouple run-tests.sh from the simpletest module
Issue summary: View changes
Issue tags: -Needs issue summary update

Updated IS and title.

Lendude’s picture

Status: Needs review » Reviewed & tested by the community

@Mile23 thanks for the feedback and IS update, all clear

So:

  • make sure Drupal CI still runs
  • make sure tests can be run without the simpletest module installed with --sqlite option
  • make sure the --browser options keeps working without the simpletest module installed

All boxes checked I think, so this looks ready.

Wim Leers’s picture

🥳 Manually tested with --sqlite, works great :)

alexpott’s picture

Status: Reviewed & tested by the community » Needs review

We're still adding CSS and JS from the simpletest module with run-tests.

I wonder if we're going about this the wrong way around. Like maybe only offer the --browser stuff if simpletest is still around. I used to use it more when we didn't output of all the verbose output as links but now I don't ever use it - \Drupal\Tests\Listeners\HtmlOutputPrinter has replaced the need. This makes me think we should deprecate the --browser option instead of maintaining all this code in core.

Mile23’s picture

Thanks, @lendude, @Wim Leers, @alexpott.

We're still adding CSS and JS from the simpletest module with run-tests.

D'oh. I never looped back to that. Fixed here, although the CSS classes still say 'simpletest' in them.

Like maybe only offer the --browser stuff if simpletest is still around.

run-tests.sh only has two useful structured reports: --xml which is our own bespoke format (not JUnit), and --browser, which lets you see why something failed. I think we still need --browser, and I've kind of already made it work anyway. This issue is about allowing us to remove the simpletest module if we'd like to without disruption: #3057420: [meta] How to deprecate Simpletest with minimal disruption

We can do a follow-up to remove the --browser report or whatever else, but way more important than that would be this long-standing issue: #2834033: Add a junit format to run-tests.sh With that you could do any of a zillion different types of visualizations using your IDE or whatever else.

If you're using run-tests.sh for concurrent test running (its big feature), then HtmlOutputPrinter doesn't really help you at all, other than the fact that you can say --browser and get links to the output it generates in your web browser.

Status: Needs review » Needs work

The last submitted patch, 35: 3074433_35.patch, failed testing. View results

Mile23’s picture

Status: Needs work » Needs review
FileSize
18.51 KB
856 bytes

Added the new system/runtests library to the ignore list for Drupal\KernelTests\Core\Theme\StableLibraryOverrideTest::testStableLibraryOverrides().

alexpott’s picture

@Mile23 I disagree with

only has two useful structured reports

- it has one useful structured report - the --xml option and two ways that the user can see what has failed --browser and --verbose. I really think we should take the opportunity to deprecate the the --browser option here. It really only was added to make it easier to get at the HTML produced during a test and now we have the \Drupal\Tests\Listeners\HtmlOutputPrinter for that.

I think we should take the opportunity to remove functionality from run-tests.sh. In Drupal 9 I'd like to see us only use it for concurrent testing and recommend the people and most CI systems use PHPUnit directly. It'd be great for it to be doing less.

Mile23’s picture

So here's run-tests.sh without a --browser option.

@alexpott you're welcome to write a change record.

Personally, I use --browser all the time, because I need the concurrency, and because --verbose looks like this:

$ php ./core/scripts/run-tests.sh --url http://localhost:8888/ --dburl mysql://root:root@localhost:8889/d8 --verbose --types PHPUnit-Unit node

Drupal test run
---------------

Tests to be run:
  - Drupal\Tests\node\Unit\PageCache\DenyNodePreviewTest
  - Drupal\Tests\node\Unit\Plugin\views\field\NodeBulkFormTest

Test run started:
  Tuesday, September 24, 2019 - 20:21

Test summary
------------

Drupal\Tests\node\Unit\PageCache\DenyNodePreviewTest           7 passes                                      
Drupal\Tests\node\Unit\Plugin\views\field\NodeBulkFormTest     1 passes                                      

Test run duration: 2 sec

Detailed test results
---------------------


---- Drupal\Tests\node\Unit\PageCache\DenyNodePreviewTest ----


Status    Group      Filename          Line Function                            
--------------------------------------------------------------------------------
Pass      Other      DenyNodePreviewTe   58 Drupal\Tests\node\Unit\PageCache\De
    
Pass      Other      DenyNodePreviewTe   58 Drupal\Tests\node\Unit\PageCache\De
    
Pass      Other      DenyNodePreviewTe   58 Drupal\Tests\node\Unit\PageCache\De
    
Pass      Other      DenyNodePreviewTe   58 Drupal\Tests\node\Unit\PageCache\De
    
Pass      Other      DenyNodePreviewTe   58 Drupal\Tests\node\Unit\PageCache\De
    
Pass      Other      DenyNodePreviewTe   58 Drupal\Tests\node\Unit\PageCache\De
    
Pass      Other      DenyNodePreviewTe   58 Drupal\Tests\node\Unit\PageCache\De
    


---- Drupal\Tests\node\Unit\Plugin\views\field\NodeBulkFormTest ----


Status    Group      Filename          Line Function                            
--------------------------------------------------------------------------------
Pass      Other      NodeBulkFormTest.   29 Drupal\Tests\node\Unit\Plugin\views
 

You'll note that it is impossible to see which function passed or failed.

Also, this critical issue is supposed to be non-disruptive, and a follow-up would be an appropriate place to remove this feature. I'd strongly suggest we not use this patch and use #37 instead.

alexpott’s picture

@Mile23 I'm confused - I think the reason why you can't see which function passed or failed is because DenyNodePreviewTest uses a data provider and the --browser option is not going to provide you any more information as far as I know. Data provider tests have always been badly represented in --verbose and --browser output. Which for me is yet another reason to try to move towards PHPUnit test reporting and away from our custom stuff.

For me this critical issue is choosing to move a load of code to core that once it is there will be hard to remove and I'm not sure this code belongs in core.

I've created a change record - https://www.drupal.org/node/3083549

Mile23’s picture

I think the reason why you can't see which function passed or failed is because DenyNodePreviewTest uses a data provider and the --browser option is not going to provide you any more information as far as I know.

See #29, #32.

For me this critical issue is choosing to move a load of code to core that once it is there will be hard to remove

+++ b/core/lib/Drupal/Core/Test/RunTests/RunTestsResultsBuilder.php
@@ -0,0 +1,245 @@
+/**
+ * Build the results part of a test result report.
+ *
+ * @internal
+ */
+class RunTestsResultsBuilder {

Marked @internal.

Also, to reiterate: *I use it.* The change record says it's being deprecated, but it's not. It's being removed without deprecation. It's not being replaced with a similar or better option, because run-tests.sh is the only way to run tests concurrently, and --browser is the only way to get useful human-readable test results.

alexpott’s picture

@Mile23 Ah I see what you are saying... the issue is with the cut off output. Ie. Drupal\Tests\node\Unit\PageCache\De and not \Drupal\Tests\node\Unit\PageCache\DenyNodePreviewTest::testPrivateImageStyleDownloadPolicy(). That is a good point. I'd still argue that really we should be telling people to use the phpunit from the CLI - because as the DenyNodePreviewTest shows the output using --browser or the CLI from run-tests.sh is unsuitable because it doesn't tell you what data has been provided.

There's an issue with the @internal stuff though.

+++ b/core/modules/simpletest/src/Form/SimpletestResultsForm.php
@@ -70,40 +70,7 @@ public function __construct(Connection $database, EnvironmentCleanerInterface $c
+    return RunTestsResultsBuilder::buildStatusImageMap();

We've marked this internal but we're using it in a module that we plan to remove from core. That's breaking the idea of something being internal.

larowlan’s picture

Trying to strike a compromise here, what if we add a --table option which outputs something better than the current sprintf approach, and then retain but deprecate the --browser option and have it trigger an error but then fallback to --table

Then we're doing something close to what the title of the change-record suggest, 'deprecating' rather than 'removing' - albeit where 'deprecating' means 'a fallback'. We're also closer to what we'll likely do if we were to finalise #2624926: Refactor run-tests.sh for Console component. as we'd likely use the table helper there too.

Looks like so

 php ./core/scripts/run-tests.sh --url http://127.0.0.1/ --dburl mysql://drupal:drupal@127.0.0.1:3306/local --table --sqlite /tmp/test.sqlite --types PHPUnit-Unit node

Drupal test run
---------------

Tests to be run:
  - Drupal\Tests\node\Unit\PageCache\DenyNodePreviewTest
  - Drupal\Tests\node\Unit\Plugin\views\field\NodeBulkFormTest

Test run started:
  Thursday, September 26, 2019 - 21:27

Test summary
------------

Drupal\Tests\node\Unit\PageCache\DenyNodePreviewTest           7 passes
Drupal\Tests\node\Unit\Plugin\views\field\NodeBulkFormTest     1 passes

Test run duration: 40 sec

Detailed test results
---------------------
+--------+-------+-------------------------+---------------+--------------------------------------------------------------------------------------------------------------+
| Status | Group | Filename                | Line Function |                                                                                                              |
+--------+-------+-------------------------+---------------+--------------------------------------------------------------------------------------------------------------+
| Pass   | Other | DenyNodePreviewTest.php | 58            | Drupal\Tests\node\Unit\PageCache\DenyNodePreviewTest->testPrivateImageStyleDownloadPolicy with data set #0() |
| Pass   | Other | DenyNodePreviewTest.php | 58            | Drupal\Tests\node\Unit\PageCache\DenyNodePreviewTest->testPrivateImageStyleDownloadPolicy with data set #1() |
| Pass   | Other | DenyNodePreviewTest.php | 58            | Drupal\Tests\node\Unit\PageCache\DenyNodePreviewTest->testPrivateImageStyleDownloadPolicy with data set #2() |
| Pass   | Other | DenyNodePreviewTest.php | 58            | Drupal\Tests\node\Unit\PageCache\DenyNodePreviewTest->testPrivateImageStyleDownloadPolicy with data set #3() |
| Pass   | Other | DenyNodePreviewTest.php | 58            | Drupal\Tests\node\Unit\PageCache\DenyNodePreviewTest->testPrivateImageStyleDownloadPolicy with data set #4() |
| Pass   | Other | DenyNodePreviewTest.php | 58            | Drupal\Tests\node\Unit\PageCache\DenyNodePreviewTest->testPrivateImageStyleDownloadPolicy with data set #5() |
| Pass   | Other | DenyNodePreviewTest.php | 58            | Drupal\Tests\node\Unit\PageCache\DenyNodePreviewTest->testPrivateImageStyleDownloadPolicy with data set #6() |
| Pass   | Other | NodeBulkFormTest.php    | 29            | Drupal\Tests\node\Unit\Plugin\views\field\NodeBulkFormTest->testConstructor()                                |
+--------+-------+-------------------------+---------------+--------------------------------------------------------------------------------------------------------------+
larowlan’s picture

Issue summary: View changes
FileSize
103.3 KB

Looks like so when Drupal.org doesn't mangle it :)

Mile23’s picture

--table +1 :-)

alexpott’s picture

  1. I love the new --table option. The dependency it adds is Symfony console and we already use it in core and we want to make run-tests.sh a console command at some point anyway so great! Nice work @larowlan.
  2. +++ b/core/scripts/run-tests.sh
    @@ -178,11 +174,9 @@
     // Display results before database is cleared.
     if ($args['browser']) {
    -  simpletest_script_open_browser();
    -}
    -else {
    -  simpletest_script_reporter_display_results();
    +  trigger_error('The --browser option is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use --table instead. See https://www.drupal.org/node/3083549\', E_USER_DEPRECATED');
     }
    +simpletest_script_reporter_display_results($args['browser'] || $args['table']);
    

    I think we could leave simpletest_script_open_browser() around for the rest on D8's life cycle and only remove in D9. Because that's when Simpletest is leaving core.

  3. +++ b/core/scripts/run-tests.sh
    @@ -317,10 +311,13 @@ function simpletest_script_help() {
    +              This enforces --keep-results
    
    @@ -449,7 +447,7 @@ function simpletest_script_parse_args() {
    +  if ($args['browser'] || $args['table']) {
         $args['keep-results'] = TRUE;
       }
    

    The --table option doesn't need the keep results option.

Mile23’s picture

Title: Decouple run-tests.sh from the simpletest module » Deprecate or remove run-tests.sh dependencies on simpletest module
FileSize
6.7 KB
4.57 KB

Super ultra plus one for @larowlan. :-)

#46.1: #2624926: Refactor run-tests.sh for Console component. :-)

#46.2: OK, reverted simpletest_script_open_browser() and added a deprecation message and trigger_error(). This means we aren't actually decoupling run-tests.sh from the simpletest module, so we'll have to rescope here a little. But since we're turning simpletest_script_open_browser() into dead code, it fits our needs. We just have to be sure and remove it later, so I'm adding a @todo for #3075490: Move simpletest module to contrib

#46.3: Neither does --verbose, any more. Done.

Updated CR. https://www.drupal.org/node/3083549

Mile23’s picture

Grr. Stupid mistake.

alexpott’s picture

Status: Needs review » Needs work
+++ b/core/scripts/run-tests.sh
@@ -446,10 +446,6 @@ function simpletest_script_parse_args() {
-  if ($args['browser'] || $args['table']) {
-    $args['keep-results'] = TRUE;
-  }

--browser does need keep-results as far as I know. Otherwise the html links won't work.

Mile23’s picture

--browser does need keep-results as far as I know. Otherwise the html links won't work.

It does if we're using it, but we aren't. If you pass in --browser, you'll get a deprecation message and the --table output. If you're somehow calling simpletest_script_open_browser() in any context other than this script, all bets are off anyway.

+++ b/core/scripts/run-tests.sh
@@ -317,10 +311,13 @@ function simpletest_script_help() {
-  --browser   Opens the results in the browser. This enforces --keep-results and
+  --browser   Deprecated, use --table instead. This enforces --keep-results and
               if you want to also view any pages rendered in the simpletest
               browser you need to add --verbose to the command line.
 
+  --table     Outputs results in a human-readable format using a table display.
+              This enforces --keep-results

Guess we need to change that, too.

alexpott’s picture

ah I see. I think if you pass in --browser then we should call simpletest_script_open_browser() - there's no point in breaking people's expectations in D8 - and now we're telling them how to set new expectations and use --table. That's how deprecation is supposed to work.

Mile23’s picture

Status: Needs work » Needs review
FileSize
44.12 KB
2.65 KB

I think if you pass in --browser then we should call simpletest_script_open_browser() - there's no point in breaking people's expectations in D8

Yah, I thought we had decided to replace it with --table in this issue, and that we needed to keep the deadcode simpletest_script_open_browser() because it might be API, but I guess not.

This patch restores full --browser without refactoring SimpletestResultsForm, adds --table, warns you that --browser is going away.

When D9 time happens, we'll fully remove --browser functionality and simpletest_script_open_browser(). #3075490: Move simpletest module to contrib

alexpott’s picture

So I've done some testing with #52 and unfortunately the only situation is works for is passing PHPUnit tests. If a PHPUnit test fails or you run Simpletests the output is not as you'd like it.

Whilst fixing this I've realised that the new --table switch is not necessary. We should fix --verbose output here and be done. The verbose output is not an API and as @Mile23 has shown there are many situations is it totally problematic for. Funnily enough though the one situation is does work for where --browser fails for is where there is a fail because the current behaviour is to output the PHPUnit output so the user can see what has happened.

Here are the test cases I ran through:

Simpletest

sudo -u _www php ./core/scripts/run-tests.sh --non-html --url http://drupal8alt.test/ --verbose --directory core/modules/simpletest/src/Tests the output with the patch looks like this.

PHPUnit success

sudo -u _www php ./core/scripts/run-tests.sh --non-html --url http://drupal8alt.test/ --verbose --types PHPUnit-Unit node the output looks like this:

PHPUnit fail

sudo -u _www php ./core/scripts/run-tests.sh --non-html --url http://drupal8alt.test/ --verbose --types PHPUnit-Unit node where I've hacked \Drupal\Tests\node\Unit\PageCache\DenyNodePreviewTest::providerPrivateImageStyleDownloadPolicy to fail some of the time - the output looks like this:

mondrake’s picture

Status: Needs review » Needs work

I tested the patch on TravisCI with some combinations of run-test.sh, https://travis-ci.org/mondrake/d8-unit/builds/590486099

Results are nice.

1) I get a PHP Notice: Undefined index: debug in /home/travis/drupal8/core/scripts/run-tests.sh on line 1342 error. I think that we need to add a 'debug' key to the $result_map in simpletest_script_reporter_init:

function simpletest_script_reporter_init() {
  global $args, $test_list, $results_map;

  $results_map = [
+  'debug' => 'Debug',
    'pass' => 'Pass',
    'fail' => 'Fail',
    'exception' => 'Exception',
  ];

2) when one of the lines of the detailed log is very long the entire table gets weird at reading (see the SimpleTestInstallBatchTest test in the link for example)

3) do I understand correct since #39 we are no longer moving any code from the simpletest module and that suffices for the scope here?

EDIT:

4) Also, in case of failing PHPUnit tests I was kind of expecting the failure log be part of the table, but it's appended after the table in fact - see for example the failing Entity tests in https://travis-ci.org/mondrake/d8-unit/builds/590494824

Mile23’s picture

Status: Needs work » Needs review
FileSize
19.03 KB
698 bytes

To me, #54 illustrates why we should concentrate on deprecation and have a follow-up, and not try to graft new features onto an untestable script. That way, we stand a chance of getting a contrib simpletest before the 9.0.0 release.

If 8.8.0-alpha1 weren't two weeks away we could continue to take our time, but it's two weeks away. My understanding is that basically we're stuck with core simpletest module after that, through the entire D9 life cycle.

I mean: If we're just going to say --verbose and not --table then there are plenty of better ways to format this without a table, that would be more readable. (PHPUnit doesn't use a table, for instance.) And in order to implement any of this consistently, we'd have to do some refactoring in order to write tests. But that will take time and plenty of back-and-forth, and then the clock will run out and it won't matter.

I suggest we roll back to #37 so that we accomplish the goal of being able to deprecate the simpletest module as per the parent issue #3057420: [meta] How to deprecate Simpletest with minimal disruption, and then pursue this in a followup: #3084354: Deprecate --browser option from run-tests.sh

This patch is #37 with a note about the followup issue.

Mile23’s picture

Title: Deprecate or remove run-tests.sh dependencies on simpletest module » Decouple run-tests.sh from the simpletest module
Issue tags: -Needs change record +Needs change record updates

Back to the old scope, please, and we don't need a change record.

alexpott’s picture

@Mile23 #37 / #55 is still not a solution though. Moving something to core and making in @internal and then planning to move it's usages to contrib is not a plan. #54 is completely fixable. The --verbose results are already compromised and #53 makes it better. Also --browser formatting is very compromised for PHPUnit tests - which by the way are the only tests in Drupal 9 core - so maintaining the feature for Drupal 9 core makes little sense.

Mile23’s picture

Moving something to core and making in @internal and then planning to move it's usages to contrib is not a plan.

Correct. That is not the plan.

So here’s a question we have to answer:

If run-tests.sh has a hard dependency on \Drupal\simpletest\Form\SimpletestResultsForm, then can we deprecate the simpletest module?

In other words: Will we do this work, and then have a release manager say that nope, we can’t deprecate either --browser or the simpletest module because there is a hard dependency between these two things?

Previous personal experience suggests that, yes, this is exactly what will happen.

So:

If we don't refactor SimpletestResultsForm then we have to keep that piece of the simpletest module in order to provide BC for run-tests.sh in D8.8+, which might very well mean not deprecating the simpletest module.

However, if we do refactor SimpletestResultsForm into RunTestsResultsBuilder, then run-tests.sh will have zero dependencies on the simpletest module at all. We could commit #55 today and literally delete the simpletest module tomorrow with no loss of functionality of run-tests.sh. You can see where I did this in #3075490-28: Move simpletest module to contrib, showing that only test fixtures referencing the simpletest module fail tests.

So: Should we force ourselves to need pieces of SimpletestResultsForm and thus the simpletest module for BC moving forward, and then needing to do the refactoring anyway when a release manager complains? Or should we refactor it now in order to not need pieces of the simpletest module going forward with a clean break?

My answer is that we should refactor in this issue, and thus give ourselves options in the next few steps of removing the module that no one wants.

I'm putting my foot down a little bit here because core maintainers have been sleeping on this problem for four years* and I do not want to end up running out the clock bikeshedding output formatting in the last two weeks. If there wasn't a looming deadline, then yah, whatever, we'll pick it up later. But there's a deadline.

I'm traveling and away from Drupal until BADCamp late next week. Then more radio silence for 5-6 days.

* Filed in 2015: #2624926: Refactor run-tests.sh for Console component.

mondrake’s picture

What if, instead of moving simpletest code to RunTestsResultsBuilder, we duplicate it in run-tests.sh? That way we could decouple the two things now and do whatever refactors of the two things separately later.

alexpott’s picture

Issue summary: View changes
FileSize
954.2 KB

I thought about #59 too.

So I'm going to repeat myself here and question the statements that @Mile23 makes about --browser being useful with --concurrency. If a test fails and you have --verbose on you see exactly where it fails regardless of --concurrency. Yes the output is not the best for successful PHPUnit tests but the important information is there ie. you know that the test has passed and if it has failed exactly where and how. Note that PHPUnit output does not even tell you what test method has passed in visual output to the CLI because this information just noise. Therefore I stand by claims that even with --concurrency the --browser is not actually useful.

Also with respect to process we are totally allowed to remove a "feature" (though I really don't regard --browser as one) from Drupal 9 and deprecate it without replacement in Drupal 8. However I contend that there is a replacement in Drupal 9 - it's called the Simpletest in contrib module which can come with its own run-tests.sh - actually it'll need to because the core will no longer run Simpletest tests because core has none.

I suggest that this issue deprecates the --browser flag and we can improve / fix the bugs in --verbose as and when we choose because they have existing even since we integrated PHPUnit.

Here's visual proof of what I'm saying... running the command sudo -u _www php ./core/scripts/run-tests.sh --color --non-html --url http://drupal8alt.test/ --verbose --concurrency 2 --types PHPUnit-Unit node where DenyNodePreviewTest as been hacked to fail.

Mile23’s picture

Also with respect to process we are totally allowed to remove a "feature" (though I really don't regard --browser as one) from Drupal 9 and deprecate it without replacement in Drupal 8. However I contend that there is a replacement in Drupal 9 - it's called the Simpletest in contrib module which can come with its own run-tests.sh - actually it'll need to because the core will no longer run Simpletest tests because core has none.

Ok, so where's the meta for this? We've got this one: #3075490: Move simpletest module to contrib On that issue I see me trying to make it so we can delete the simpletest module, but I don't see a plan to do this. There's also the issue filed in the contrib module: #3076422: [contrib] Move simpletest module to contrib for D9

We have the beginnings of speccing that out here: #3057420-46: [meta] How to deprecate Simpletest with minimal disruption

If someone could please write it all down such that it's clear what's going to happen in the next few days (because it's days at this point), then we can talk about how this issue fits into that process.

mondrake’s picture

#59, in practice. No interdiff, this takes bits of #55 and bits of #53.

--browser is deprecated as an option, as well as the functions in run-tests.sh that support it. Code is duplicated from simpletest. So we can refactor the run-test.sh --verbose output later, independently from the fate of the simpletest module.

Mile23’s picture

Status: Needs review » Needs work

OK, #62 is good. I'd much rather not make run-tests.sh more complex, but it's all deprecated and we accomplish the scope of the issue, and instead of refactoring to a class it duplicates to some functions.

We can use the follow-up to improve whatever needs improving in either --verbose or --browser or --table or --chair or whatever else: #3084354: Deprecate --browser option from run-tests.sh

  1. +++ b/core/scripts/run-tests.sh
    @@ -19,11 +19,11 @@
    -use Drupal\simpletest\Form\SimpletestResultsForm;
    

    Good so far...

  2. +++ b/core/scripts/run-tests.sh
    @@ -19,11 +19,11 @@
    +use Drupal\simpletest\TestBase;
    
    @@ -831,7 +835,10 @@ function simpletest_script_run_one_test($test_id, $test_class) {
    +    elseif (class_exists(TestBase::class) && is_subclass_of($test_class, TestBase::class)) {
    

    It's a bit of a nit because it works, but this is a dependency on a class in the Drupal\simpletest namespace. Can we please not use TestBase and instead have the class name as a string in class_exists() and is_subclass_of()?

  3. +++ b/core/scripts/run-tests.sh
    @@ -1515,16 +1530,19 @@ function simpletest_script_open_browser() {
    +  if (\Drupal::moduleHandler()->moduleExists('simpletest')) {
    +    $libraries[] = 'simpletest/drupal.simpletest';
    +  }
    

    So while this is all deprecated (and still in core) the CSS and JS will load, diggit.

Other than the one thing above, +1.

mondrake’s picture

WRT #63.3, how about duplicating the CSS too, adding maybe an entry in system.libraries? The JS is totally irrelevant here, it seems - it is needed for the tests list form, not for the test results one

Mile23’s picture

Re: #64: I think that between #3084493: Fully deprecate and prepare for removal of SimpleTest module and #3084354: Deprecate --browser option from run-tests.sh we'll either discover that we need to move the CSS around, or just conditionally loading that library will be sufficient.

mondrake’s picture

#63.2 done (I do not understand why it's better, but no problem)

Mile23’s picture

Status: Needs review » Reviewed & tested by the community

Thank you, @mondrake.

Setting RTBC even though I did some patches up there, so we can expedite this.

alexpott’s picture

I have some reservations / tweaks I think we should make but as it’s the weekend and I’m on my phone I can’t add them right now. I will comment first thing tomorrow.

larowlan’s picture

Thanks Mondrake! Couple of questions, feel free to push back if these are not reasonable

  1. +++ b/core/scripts/run-tests.sh
    @@ -831,7 +834,10 @@ function simpletest_script_run_one_test($test_id, $test_class) {
    +    // If we aren't running a PHPUnit-based test, then we might have a
    +    // Simpletest-based one. Ensure that: 1) The simpletest framework exists,
    +    // and 2) that our test belongs to that framework.
    +    elseif (class_exists('Drupal\simpletest\TestBase') && is_subclass_of($test_class, 'Drupal\simpletest\TestBase')) {
    

    Is there a way here we can also trigger a deprecation error if the class doesn't exist - something like 'your tests rely on simpletest and this will be moved to contrib in 9.0.0 - please move to WTB or declare a test_dependency on simpletest module?'

  2. +++ b/core/scripts/run-tests.sh
    @@ -1494,6 +1500,14 @@ function simpletest_script_load_messages_by_test_id($test_ids) {
    + * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. This function
    + *   supports the --browser option in this script. Use the --verbose option
    + *   instead.
    

    should we be triggering a deprecation error here too?

  3. +++ b/core/scripts/run-tests.sh
    @@ -1570,3 +1587,250 @@ function simpletest_script_open_browser() {
    +function simpletest_script_add_result_form(array &$form, array $results) {
    

    should we make these 3 anonymous functions inside simpletest_script_open_browser so no-one else can call them?

Mile23’s picture

Re: #69.1: We don't actually have the contrib lined up at this point, so let's point to this change record: https://www.drupal.org/node/3030340

Also, we want to do that once for the test run, and not once per test class. Given this tiny bit of complexity, it might be better to add that when we're clearer what the actual course of action is.

alexpott’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
16.56 KB
11.65 KB

Re #69.1 this gets to something I've been pondering this weekend. If simpletest is moving to contrib then either (a) run-tests.sh in Drupal 9 needs to be able to run Simpletest tests or (b) DrupalCI needs to support different test runners per test type. The simpletest solution is to suppose that (a) to be true for now. I've tried to address this point and be able to inform the user but adding a new failure mode when simpletest_script_run_one_test() cannot run a test.

Re #69.2 I don't think so we already have an unsilenced (so users actually see it) deprecation error. Adding a silenced deprecation error here is unlikely to ever be caught because deprecation handling is set up at a lower level in the test runner than this.

Re #66 if we're going to deprecate simpletest_script_open_browser() - which I'm totally in favour of. Then we don't need to bring all the functionality into run-tests.sh. The simpler and less complex thing to do is to move the functionality into the simpletest module. This also answers #69.3

Mile23’s picture

Status: Needs review » Reviewed & tested by the community

If simpletest is moving to contrib then either (a) run-tests.sh in Drupal 9 needs to be able to run Simpletest tests or (b) DrupalCI needs to support different test runners per test type

So we have three options:

  1. We leave simpletest in core.
  2. We remove simpletest from core with no contrib for BC.
  3. We remove simpletest from core and make a contrib project for BC.

If we succeed in splitting up run-tests.sh to not use simpletest module in this issue then we can do any of them.

For the second and third option we have this issue:

For the third option we have these follow-up issues as well:

We can add another follow-up about how to run those tests if needed, or add a note to #3075490: Move simpletest module to contrib

For the use-case of a d.o contrib module that needs drupalci to run WebTestBase tests in Drupal 9: We can spec the new contrib simpletest module to have its own script runner, and maintainers can use container_command in their drupalci.yml file to run it. This is the already-existing solution for now, and if there is hue and cry we can work on a better one.

+1 on #71, which keeps --browser but separates it from run-tests.sh, so there are no hard dependencies with simpletest module. This also deprecates --browser, so we can close #3084354: Deprecate --browser option from run-tests.sh We can deprecate --browser because --verbose gives adequate fail info.

Lendude’s picture

+++ b/core/scripts/run-tests.sh
@@ -1494,79 +1502,21 @@ function simpletest_script_load_messages_by_test_id($test_ids) {
+  trigger_error('In order to use the --browser option the Simpletest module must be available. See https://www.drupal.org/node/3030340.');

I think this should be referencing [#3083549] and not the WebTestBase deprecation?

alexpott’s picture

@Lendude good point. Leaving at rtbc as this is only fixing text.

mondrake’s picture

+++ b/core/scripts/run-tests.sh
@@ -450,6 +445,7 @@ function simpletest_script_parse_args() {
+    trigger_error('The --browser option is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use --verbose instead. See https://www.drupal.org/node/3083549', E_USER_DEPRECATED);

@@ -843,6 +845,12 @@ function simpletest_script_run_one_test($test_id, $test_class) {
+      trigger_error(sprintf('Can not run %s. If this is a WebTestBase test the simpletest module must be installed. See https://www.drupal.org/node/3030340', $test_class));

@@ -1494,79 +1502,21 @@ function simpletest_script_load_messages_by_test_id($test_ids) {
+  trigger_error('In order to use the --browser option the Simpletest module must be available. See https://www.drupal.org/node/3083549.');

Nitpick: instead of trigger_error, why not using simpletest_script_print to echo the information to CLI? trigger_error is meant to capture deprecation errors in tests - but here we would log the message in error.log (do we need that?), and the output on CLI is not very nice (see example below). run-tests.sh is not tested itself.

$ php core/scripts/run-tests.sh --verbose --color --file --php $(which php) --browser --url http://127.0.0.1:8080 core/modules/simpletest/src/Tests/BrokenSetUpTest.php

PHP Deprecated:  The --browser option is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use --verbose instead. See https://www.drupal.org/node/3083549 in /home/travis/drupal8/core/scripts/run-tests.sh on line 453

Deprecated: The --browser option is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use --verbose instead. See https://www.drupal.org/node/3083549 in /home/travis/drupal8/core/scripts/run-tests.sh on line 453
alexpott’s picture

@mondrake good call. The output with simpletest_script_print_error() is not that much better - it is indented for whatever reason. But it's not duplicated and there's a tonne of precedent in the file.

This means that we should follow deprecation policy and do a silenced @trigger_error in simpletest_script_open_browser() just in case.

Again as this is only touching on the display of messages leaving at RTBC.

Mile23’s picture

RTBC +1. :-)

xjm’s picture

So on #2750461: Remove Simpletest UI because we don't want to maintain a graphical test runner I indicated I was alright with simpletest moving to contrib and core not providing a UI test runner so long as verbose output continued to be provided by the core test runner. I'd say that's an essential part of the core featureset for the test runner.

If that's being deprecated here I have strong concerns with that.

Mile23’s picture

I'll say #58 came true about 75%. :-)

Mile23’s picture

Status: Reviewed & tested by the community » Needs work

Let's undeprecate --browser, follow-up in #3084354: Deprecate --browser option from run-tests.sh to solve for no-browser.

Since we have to keep the feature (for now), we either duplicate the report code in the script per @mondrake, or we move it to a class like I did. Either way. :-)

Then in the followup we move it wherever it has to be.

alexpott’s picture

Status: Needs work » Needs review

verbose output continued to be provided by the core test runner

If that's being deprecated here I have strong concerns with that.

--verbose is not deprecated. Verbose output is not being deprecated. The ability to open it in a browser window is.

alexpott’s picture

Issue summary: View changes

Updated the issue summary to be inline with the latest patch.

catch’s picture

Issue summary: View changes

Added an extra line to the issue summary to make it clear that --verbose gives you links to HTML, so the only thing we lose from --browser is it opening the actual browser in the site under test for you. But since these are equivalent for actually figuring out what went wrong, we're not losing much of anything by deprecating it. Discussed this with @xjm and we're both agreed this is good to go.

Lendude’s picture

run-tests.sh also uses Drupal\simpletest\Form\SimpletestResultsForm::addResultForm(), so that it can build the results form for its --browser option. This should be turned into a lightweight form element builder somewhere within the Drupal\Core\Tests\ namespace, so that it can be used by both run-tests.sh and simpletest as contrib.

We can remove this from the IS right?

catch’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs release manager review, -Needs product manager review

Back to RTBC. I'm arbitrarily removing the Needs product manager review tag because we're removing a CLI option that is already de-facto deprecated by another CLI option. Added it to #3075490: Move simpletest module to contrib which is the actual issue that's removing all the stuff we're preparing for here and elsewhere.

catch’s picture

Issue summary: View changes

per @Lendude in #84

xjm’s picture

--verbose is not deprecated. Verbose output is not being deprecated. The ability to open it in a browser window is.

This is unclear. What use is HTML if it cannot be opened in a browser somehow? Is the output still HTML?

When I said to @Mile23 that what was important to me was that core continue to provide verbose output, and present links to said verbose output in the run_tests.sh output, he implied (but did not outright say I guess) that this functionality was being deprecated. If core retains the ability to output a list of verbose output HTML files on the file system, which can be opened in a browser with copy and paste, and if the UI test runner in SimpleTest module itself also continues to work with links available to this output, that's fine. However, if an actual major feature is being removed from the module, that's what will (always) need product manager review.

alexpott’s picture

Links to the pages generated by the system under test during a test are available if printerClass="\Drupal\Tests\Listeners\HtmlOutputPrinter" is set - which is now the default! Yay #2870145: Set printerClass in phpunit.xml.dist.

Unfortunately --browser has never been able to provide links to these generated by PHPUnit tests (i.e all browser tests apart from the Simpletest module's test now in core). --browser (and run-tests.sh in general) is not all great for PHPUnit test output.

Compare what happens when you do (on HEAD):
php ./core/scripts/run-tests.sh --color --non-html --url http://drupal8alt.test/ --verbose --class '\\Drupal\\Tests\\node\\Functional\\NodeAdminTest'
php ./core/scripts/run-tests.sh --color --non-html --url http://drupal8alt.test/ --verbose --browser --class '\\Drupal\\Tests\\node\\Functional\\NodeAdminTest'

versus
./vendor/bin/phpunit -v -c ./core core/modules/node/tests/src/Functional/NodeAdminTest.php

If your phpunit.xml.dist has been properly set up you'll get browser output whilst running PHPUnit. Neither of the run-tests.sh versions are able to link the test browser output. This patch has no impact on the ability to get to the html generated by the test.

xjm’s picture

Issue summary: View changes

I'm putting my foot down a little bit here because core maintainers have been sleeping on this problem for four years*

This is hugely insulting, BTW, and unnecessarily combative. Core maintainers work on a lot of stuff, and a response from one core maintainer shouldn't be confused with signoff on a plan that hasn't been reviewed and signed off by relevant stakeholders.

Yes, there's a lot of technical debt in SimpleTest. We had a whole initiative to clean up that technical debt and among that initiative's requirements were to retain the features of the current workflow for PHPUnit tests instead of WTB tests.

From my perspective, these issues are major task, like any other major tasks to clean up significant technical debt. There won't be any security, data ingerity, or upgrade path implmications if we retain the features in core. There's no depdnencies EOLing their security coverage or aside from phpunit forcing thei ridiculous schedule on us. https://www.drupal.org/core/issue-priority#critical outlines when an issue or chain of issues should be critical.

TLDR, I think this suite of issues should probbaly be marked major, not critical. If it's not done in time for 8.9/9.0 that's kinda a bummber, but it it still is acceptable.

For review: drup

  • catch committed 1b0ae80 on 8.8.x
    Issue #3074433 by Mile23, alexpott, mondrake, larowlan, Lendude:...
catch’s picture

Priority: Critical » Major
Status: Reviewed & tested by the community » Fixed
Issue tags: -Needs change record updates

This is unclear. What use is HTML if it cannot be opened in a browser somehow? Is the output still HTML?

I think this was a crosspost but just to confirm:

--browser was literally opening a browser window to the page in question on the under-test simpletest site. --verbose provides a link to the stored HTML of the page.

Agreed on issue priority, this is more rightly major alpha-deadline than critical - even if it'd be a massive shame if we can't remove Simpletest for 9.x it's not actually blocking the 9.x release or causing other critical issues.

Untagging 'Needs change record update' since the change record is accurate.

Since the actual proposal here is OK, and the patch is also OK... Committed 1b0ae80 and pushed to 8.8.x. Thanks!

Mile23’s picture

This is hugely insulting, BTW, and unnecessarily combative. Core maintainers work on a lot of stuff, and a response from one core maintainer shouldn't be confused with signoff on a plan that hasn't been reviewed and signed off by relevant stakeholders.

I have to address this, because it's incorrect.

I've used all of the channels one is supposed to use to attempt to address this issue. I talked to subsystem maintainers about it on numerous occasions. If I were a subsystem maintainer myself, I'd feel as though it were important to get 'signoff by relevant stakeholders,' but I'm not.

I've been working within my role as an unpaid volunteer in a best-faith effort to try and deprecate the simpletest module for many years. At any point, anyone with any degree of authority greater than mine could have said, "We're not doing that until much later in the release cycle," and I would have said: "The sooner the better, though..." And you'd repeat that you have a plan, and I'd be OK with that.

But: You folks snoozed on this for four years, and it frustrates me. What's insulting is four years of re-rolls because no one said, "No, we don't want this at this point." And no one said that because there never was a plan other than the one I outlined.

Status: Fixed » Closed (fixed)

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