Proposal: Make unit test tickets easier to distinguish

This is a follow-up of a conversation in #core on Slack.

Currently there is no easy way to identify TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets specifically for adding unit tests. Some are added to the Build/Test Tools component, however the tests are not really “tools”. The reason for this is that unit tests, just like build and test tools, are “non-production code”. That means they can be committed at any time during the WordPress development cycle and do not follow the general milestones-based workflow.

Additionally, many tickets for adding unit tests are marked as “enhancements”. Following the release cycle workflow, enhancements cannot be committed during betaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. and RCrelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta).. However, in practice unit tests can be committed at any time. It can be difficult to isolate these today, as the Trac search form lacks a filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. for such tickets, which makes triaging a bit harder.

Some suggestions

During the discussion in #core, several ideas were proposed about how this can be made to work better. And while there isn’t currently much traction on adding E2E tests to CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., any option explored should take this test type into account. In no particular order:

  • Component: A new Tests component, which would be exempt from the general workflow, similar to Build/Test Tools. Example component filter.
  • Focus: A tests focus, similar to the existing docs focus. Example focus filter.
  • Keyword: A tests-only keyword to identify that it’s for unit/E2E tests only, and serve to filter tickets for triagetriage The act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. reports. Example keyword filter.
  • Milestone: An Any Time milestone could indicate when this type of ticketticket Created for both bug reports and feature development on the bug tracker. could be committed, being primarily reserved for tests- and docs-only tickets. Example milestone filter.
  • Type: A test ticket type, to clearly differentiate from the current defect (bug)enhancement, and task (blessed) types. Example type filter.
  • Type (alternative): A new non-production type could be introduced to broadly cover any ticket that does not affect build/production code. Example type filter.

I think that any of the proposed solutions would make searching and triaging test-oriented tickets a bit easier. Some are more flexible in that it’s easier to combine terms (focuses and keywords).

What are your thoughts on these ideas to make test-only tickets easier to distinguish? Please help continue the discussion in the comments below!

Thanks @costdev and @ironprogrammer for the suggestions and reviews.

#proposal, #trac