In the core BC policy (https://www.drupal.org/core/d8-bc-policy) it states :

Tests
The contents of automated tests provided by core modules are never considered part of the API. While the testing framework itself may be treated as an API individual test classes are always internal.

I propose that we reword this to exclude the entire testing framework from the semver BC promise but instead promise a best effort not break contributed tests running on Drupal.org.

This has come up in #2469721: Add functionality to store browser output to BrowserTestBase

Rationale

The Testing framework requires development that won't be the focus during main product development therefore aligning it to the product semver promise effectively hamstrings innovation in this idea and results in major disadvantages. The only advantage of keeping the semver promise is that contrib module's test don't break because of a core testing API change. However I think that we can cover this with a looser promise to make best efforts to not break contributed tests running on Drupal.org.

CommentFileSizeAuthor
#3 doc.patch1.24 KBdawehner

Comments

alexpott created an issue. See original summary.

dawehner’s picture

While working on improving the text, I realized that https://www.drupal.org/core/d8-bc-policy doesn't link to the definition of semv.

dawehner’s picture

StatusFileSize
new1.24 KB
xjm’s picture

TBH I just don't understand why we would do this. WebTestBase, KernelTestBase, etc. are APIs and should be treated with the same care we treat other APIs. Contrib tests aren't the only things that depend on them.

The Testing framework requires development that won't be the focus during main product development therefore aligning it to the product semver promise effectively hamstrings innovation in this idea and results in major disadvantage.

I think that's really hyperbolic. How does it hamstring innovation when we can innovate right now in the minor development branch and it is never frozen? I feel like every time one of these issues are coming up, people are forgetting that the production branch isn't supposed to innovate; it's supposed to scoot sites along with bugfixes until the next innovation-rich minor is released in six months, but there is never any barrier or freeze to innovating in the development branch. We can commit awesome new APIs to 8.2.x every day.

I can see the case for saying BrowserTestBase was supposed to be considered experimental/under development/whatever.

xjm’s picture

I really feel like this issue feeds misconceptions. 8.0.x was inconsistently restricted since summer 2013 and very restricted during the year-long beta because of the incredible technical debt, and we all have PTSD about it. But there will never be a situation like that in D8 again, ever. The development branch is never frozen, never restricted, always open for additions.

dawehner’s picture

Can we please separate the breaking discussion from the feature additional discussion? IMHO we are discussion about both things at the same time ...

Just imagine a feature addition as in some helpful new assertion or what not. People would profit from it ...

people are forgetting that the production branch

IMHO the term production simply doesn't make any sense for testing. The endusers can update without any issues.

Here is my opinion. Testing is one of the places where we can still actually make people's life easier and better and speed up contrib/custom development time, and especially in the case where this discussion started, we talk about a fundamentally change. I challenge you to debug a BrowserTestBase test.
This improvement would last for 6 months, which noone can deny is a long time.

Well, I think I just don't get things. It was the case for a long time that the testing system could be improved at any point, and actually was.

berdir’s picture

Yeah, I we should at least support the main base classes IMHO.

With one exception I guess, which is kernel test base which is marked as deprecated and to be removed in 8.2.x. I think that would be nice to remove then. We did a ton of work recently to prepare for that in core.

Even changes in the production branch can be problematic for tests.

For example, we removed the field.module kernel test base class (added again) and the migrate kernel test base class (gone for real I guess). That's annoying for contrib because d.o runs tests already against 8.2.x and until recently against 8.1.x. Which means modules had no way to have tests passing for 8.0.x and 8.1.x with the same code base, without stopping to use those base classes.

Whatever we do, due to how testing works atm on d.o, I would recommend to have a BC period for testing changes in minor branches that matches how we run tests. Meaning, as long as 8.0.x is supported, it should be a possible for a module to have its test running against 8.0.x, 8.1.x (and currently also 8.2.x). Once 8.0.x is officially unsupported, we could make breaking changes there.

dawehner’s picture

SO berdir is arguing for BC changes, while other people are arguing for features, nice!

catch’s picture

For me there are good reasons to treat the testing framework differently from the rest of core.

With the rest of core, we specifically do not want to encourage people to use new APIs that we might introduce in patch releases, regardless of semver or not:

- people might be running an older patch release of core with a newer contrib release that doesn't have the method, then we'd break their site
- we don't want to commit refactoring core patches to patch releases due to risk of unintentional breakage

However for tests there are things we do want to do:

- increase test coverage of core - i.e. via writing tests with real browsers that execute javascript that run against 8.1.x - this will allow us to fix bugs in 8.1.x with more confidence that they're tested
- write tests for contributed modules, which currently have to support a single set of tests which run against two to three core branches at once
- in 99.9% of cases, we always run tests against the HEAD of core branches, so don't need to worry about incompatibilities with older patch releases if contrib starts using the newer APIs, only divergence between minor releases

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

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

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

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

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

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

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

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

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

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Status: Active » Closed (outdated)

The text of the policy, Automated test classes, was updated in 2018. As I read it, it meets the proposal here.

I am closing this as outdated. If that is incorrect, re-open and add a comment explaining what remains to be completed.