[wp-trac] [WordPress Trac] #42282: Execute PHPUnit continuously over watched files in local environments

WordPress Trac noreply at wordpress.org
Fri Oct 20 04:44:44 UTC 2017


#42282: Execute PHPUnit continuously over watched files in local environments
----------------------------------------+------------------------------
 Reporter:  iandunn                     |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Build/Test Tools            |     Version:  trunk
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+------------------------------

Comment (by iandunn):

 Replying to [comment:2 netweb]:
 > end up with an unmaintainable list attempting to map `/src` files to the
 `/tests` that cover those source files in `/tests`.
 > [...] we could add some ''watch'' tasks for specific components,  e.g.
 `grunt watch:multisite`
 > [...] there's quite possibly a way to do this dynamically where any
 passed in ''PHPUnit group'' name would spawn the appropriate PHPUnit group
 task which would be much cleaner than adding numerous named instances.

 Yup, that's exactly what I was thinking. I don't think we need to try and
 automate it, at least for v1. We can just accept parameters for them, like
 `grunt watch:phpunit --files=src/wp-admin/includes --group=community-
 events`. (That's the wrong syntax for Grunt, but you get the idea).

 We could automatically append `/*.php` if it's not in the input, just for
 convenience.

 > Having a default watch task to run the entire PHP test suite I don't
 think is practicle for a ''watch'' task because of the time taken to
 finish a complete PHPUnit test run

 Good point. Maybe we could just require that `files` be passed in instead?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42282#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list