Conventions around phpunit in Drupal 7

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by greggles on November 11, 2016 at 10:50pm

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

Posted by afinnarn on February 7, 2017 at 8:27pm

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:

AltStyle によって変換されたページ (->オリジナル) /