Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for phpunit testing in Drupal 8 #318

Open
markdboyd opened this issue Feb 28, 2017 · 2 comments
Open

Add support for phpunit testing in Drupal 8 #318

markdboyd opened this issue Feb 28, 2017 · 2 comments

Comments

@markdboyd
Copy link

markdboyd commented Feb 28, 2017

We need to support PHPUnit testing for Drupal 8.

  • Is PHPUnit unnecessarily slow with grunt or virtual environments?
  • How can we allow running phpunit for just some packages while also making grunt test run all the tests?

Original Post

On a freshly built GDT project, running the PHPunit tests often takes over a minute, even though there are no tests defined. I suspect that PHPUnit may be unnecessarily scanning folders besides "modules/custom". I tried to alter this behavior by configuring phpunit.xml.dist, but to no effect.

I also see this note from @jhedstrom on #121. I tried using that command to run PHPUnit tests, but got errors related to Simpletest module not being installed.

I should also note that my project runs on Docker containers on a Phase2 devtools managed VM, so perhaps the virtualization could be part of the root issue here.

@grayside grayside changed the title PHPUnit testing is slow Add support for phpunit testing in Drupal 8 Feb 28, 2017
@mike-potter
Copy link
Member

The slowdown is related to using NFS within the P2 devtools docker container. It's very possible that there is still a fix to be made to PHPUnit to help with this (similar to recent fixes in Drush and Drupal/core), but the ultimate solution with the P2 devtools is to move away from NFS.

I don't see anything specific that GDT itself is doing that would cause this.

@markdboyd
Copy link
Author

I'm no expert on file systems, but I do know that we moved towards NFS because it was incredibly more stable than what we were using before (vboxFS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants