The rest of the WTB tests can be left as-is, because the goal is to get rid of WTB. Some of the test class names are ambiguous, and really should be cleaned up so we know what they test, but that should be a very (VERY) low priority. For instance, there's BrowserTest and SimpletestBrowserTest, which cover similar areas, but you couldn't tell what based on the class names.

Attached is a patch which adds @groups to WTB tests and @todos for which tests/methods to move.

After some work, it turns out that Drupal\simpletest\Tests\UiPhpUnitOutputTest is tricky as a BTB test. It calls simpletest_phpunit_run_command() which exec()s PHPUnit with --printer SimpletestUiPrinter. If you have your phpunit.xml set up to use HtmlOutputPrinter (which you should...), then PHPUnit will use HtmlOutputPrinter instead, failing the test.

So since this test is a WTB test, it bypasses all that by virtue of not running under PHPUnit. So we can't move it to be a BTB test without changing it radically.

But it turns out the reason for the test existing is to make sure the output from the test is filtered to have clickable URLs and so forth. This can be unit tested, so this patch adds the unit test of SimpletestUiPrinter. If that's enough to replace UiPhpUnitOutputTest then we can remove it a future patch here.

The rest is fairly straightforward. Drupal\simpletest\Tests\SimpleTestBrowserTest::testTestingThroughUI() was loading the simpletest UI form twice per each test it ran, so that's about a minute and a half more than it needed. That's fixed.

HtmlOutputPrinter (the Legacy one) didn't have the same constructor signature as the superclass.

This woudn't matter for testing SimpletestUiPrinter if we just mocked the class and bypassed the constructor. However, if you look at HtmlOutputPrinter (the not-Legacy one), you'll see that we use a class_alias() to switch the namespace of the class before it's defined.

I think this confuses the PHPUnit mocking system, because I was unable to mock SimpletestUiPrinter, which inherits from one of these two classes, depending.

So the easy solution is to just add all the constructor defaults, copied from the superclass and new one into being.

The question still remains from #5: We could just remove the UI test for the output printer, if we're OK with relying on the unit test. No harm in leaving it in, since it doesn't actually spend 20 seconds generating the test form or any such.