Problem/Motivation
In order to convert more tests from WTB to BTB in one big bang conversion we want to get some estimation of what kind of failures might exist.
Proposed resolution
This issue should provide a gigantic patch which does the following and JUST the following:
- Using this tool: https://www.drupal.org/files/issues/browsertest-convert.php_.txt move every WTB class to the right BTB directory
- Change the use statements
- Add traits that the test case needs
- ¡STOP!
Instructions how to work with this patch:
- Apply the patch
- Look at a test failure
- Figure out whether a) There is some missing stuff in BTB, open a follow issue for that. Exclude this particular test for now with a documentation about which issue this is blocked on b) If this test needs manual adaption, try to create issues for them as well
- When you changed anything at the script run the following:
rm -Rf core/modules && git checkout 8.3.x core/modules && php browsertest-convert.php && git add core/modules
Remaining tasks
- Announce this change on https://groups.drupal.org/core after 8.3.0-alpha1 is released.
- Commit this patch on Feb 21st 2017
Announcement text proposal
Title A big chunk of old tests using WebTestBase wil be converted to PHPUnit BrowserTestBase on Feb 21st
As part of the PHPUnit initiative a considerable part of Simpletests will be converted to PHPUnit based browser tests on February 21st 2017. A backwards compatibility layer has been implemented so that many Simpletests can be converted by just using the new BrowserTestBase base class and moving the test file. There is also a script to automatically convert test files in the conversion issue.
Developers are encouraged to use BrowserTestBase instead of Simpletest as of Drupal 8.3.0, but both test systems are fully supported during the Drupal 8 release cycle. The timeline for the deprecation of Simpletest's WebTestBase is under discussion.