ddev / ddev-drupal-contrib

DDEV integration for developing Drupal contrib projects
Apache License 2.0
62 stars 11 forks source link

Difference between `ddev-drupal-contrib` and `ddev-selenium-standalone-chrome`? #24

Closed gitressa closed 5 months ago

gitressa commented 5 months ago

I tried the awesome ddev-selenium-standalone-chrome add-on yesterday. Shortly after that, I heard about ddev-drupal-contrib.

It looks like they may overlap, so how does ddev-drupal-contrib compare to ddev-selenium-standalone-chrome -- like where do they overlap, and what makes them different from each other?

It looks like they both allow running PHPUnit and Nightwatch tests, but ddev-drupal-contrib may be only for contrib modules, and with a simpler syntax ... ?

If ddev-drupal-contrib allowed running also core, contrib and individual tests like below, that would be awesome. Or maybe that's already possible, but not documented on the README?

As it works currently, run tests from within a contrib module folder: ddev phpunit

Is this possible? Run a group of tests or a single test, from anywhere:

If not, it would be a fantastic feature, since the ddev-selenium-standalone-chrome syntax is slightly unwieldy:

ddev exec -d /var/www/html/web "../vendor/bin/phpunit -v -c ./core/phpunit.xml.dist ./modules/contrib/simplenews/tests/src/Functional/SimplenewsSendTest.php"

Or maybe it's the other way around, and the short commands such as ddev phpunit --group olivero could be allowed to work in ddev-selenium-standalone-chrome?

weitzman commented 5 months ago

This package does nothing to help you run Drupal core tests.

You can run some or all of your contrib module's tests. All filtering options like --group from phpunit are honored by ddev phpunit. You rarely need them though since you are only testing your own contrib module with ddev-drupal-contrib.

weitzman commented 5 months ago

I can reopen if more action is needed.

gitressa commented 5 months ago

Thanks for clarifying and answering my questions, it helped me understand it better. I have created follow up issues, for documentation and some failing tests.