Conventions around phpunit in Drupal 7

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
greggles's picture

Hello!

I'm working on a patch to add phpunit for some functions for a Drupal 7 module: https://www.drupal.org/node/2826752

To make this useful, we need a way to run it inside our CI (since DrupalCI testbots won't run it).

I currently solve this for our custom modules with a section of our probo.yaml:

  - name: Run PHPUnit tests
    plugin: Script
    script: |
      cd /var/www/html
      find sites/all/modules/custom -maxdepth 2 -type f -name "phpunit.xml" | while read line ; do
        ./sites/all/tests/bin/phpunit --configuration=$line --verbose
      done

I'd love to do something similar for all of contrib. Is there any convention that people are following today to make this work? Anyone have any feedback on making this a convention?

Comments

I Like It

afinnarn's picture

I have very little experience with Drupal 7 testing, but as I'm starting to gain more experience I'll probably try https://www.drupal.org/project/drupal_ti out since Travis CI is popular and I have some experience using it.

Testing and Quality Assurance

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week