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

Running multisite tests results in no tests being executed #1326

Closed
westonruter opened this issue Jul 1, 2024 · 5 comments · Fixed by #1327
Closed

Running multisite tests results in no tests being executed #1326

westonruter opened this issue Jul 1, 2024 · 5 comments · Fixed by #1327
Labels
Infrastructure Issues for the overall performance plugin infrastructure [Type] Bug An existing feature is broken

Comments

@westonruter
Copy link
Member

I just noticed that running composer test-multisite:plugins results in no tests being executed:

Command output
> test-php-multisite
> wp-env run tests-cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:plugins

ℹ Starting 'composer test-multisite:plugins' on the tests-cli container. 

time="2024-07-01T18:34:29Z" level=warning msg="/home/runner/wp-env/affcfaaa23ba[11](https://github.com/WordPress/performance/actions/runs/9748988283/job/26906192989?pr=1325#step:10:12)c359507e851c8b72c2/docker-compose.yml: `version` is obsolete"
Composer could not detect the root package (wordpress/performance) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
> phpunit '-c' 'tests/multisite.xml' '--verbose' '--testsuite' 'auto-sizes'
Installing...
Installing network...
Running as multisite...
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
PHPUnit 8.5.38 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.0.30
Configuration: /var/www/html/wp-content/plugins/performance/tests/multisite.xml

No tests executed!
> phpunit '-c' 'tests/multisite.xml' '--verbose' '--testsuite' 'dominant-color-images'
Installing...
Installing network...
Running as multisite...
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
PHPUnit 8.5.38 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.0.[30](https://github.com/WordPress/performance/actions/runs/9748988283/job/26906192989?pr=1325#step:10:31)
Configuration: /var/www/html/wp-content/plugins/performance/tests/multisite.xml

No tests executed!
> phpunit '-c' 'tests/multisite.xml' '--verbose' '--testsuite' 'embed-optimizer'
Installing...
Installing network...
Running as multisite...
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
PHPUnit 8.5.[38](https://github.com/WordPress/performance/actions/runs/9748988283/job/26906192989?pr=1325#step:10:39) by Sebastian Bergmann and contributors.

Runtime:       PHP 8.0.30
Configuration: /var/www/html/wp-content/plugins/performance/tests/multisite.xml

No tests executed!
> phpunit '-c' 'tests/multisite.xml' '--verbose' '--testsuite' 'image-prioritizer'
Installing...
Installing network...
Running as multisite...
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
PHPUnit 8.5.38 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.0.30
Configuration: /var/www/html/wp-content/plugins/performance/tests/multisite.xml

No tests executed!
> phpunit '-c' 'tests/multisite.xml' '--verbose' '--testsuite' 'optimization-detective'
Installing...
Installing network...
Running as multisite...
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
PHPUnit 8.5.38 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.0.30
Configuration: /var/www/html/wp-content/plugins/performance/tests/multisite.xml

No tests executed!
> phpunit '-c' 'tests/multisite.xml' '--verbose' '--testsuite' 'performance-lab'
Installing...
Installing network...
Running as multisite...
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
PHPUnit 8.5.38 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.0.30
Configuration: /var/www/html/wp-content/plugins/performance/tests/multisite.xml

No tests executed!
> phpunit '-c' 'tests/multisite.xml' '--verbose' '--testsuite' 'speculation-rules'
Installing...
Installing network...
Running as multisite...
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
PHPUnit 8.5.38 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.0.30
Configuration: /var/www/html/wp-content/plugins/performance/tests/multisite.xml

No tests executed!
> phpunit '-c' 'tests/multisite.xml' '--verbose' '--testsuite' 'webp-uploads'
Installing...
Installing network...
Running as multisite...
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
PHPUnit 8.5.38 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.0.30
Configuration: /var/www/html/wp-content/plugins/performance/tests/multisite.xml

No tests executed!
✔ Ran `composer test-multisite:plugins` in 'tests-cli'. (in 11s 11ms)

It appears that tests/multisite.xml never got updated to reflect the changes that were made to phpunit.xml.dist.

@westonruter westonruter added [Type] Bug An existing feature is broken Infrastructure Issues for the overall performance plugin infrastructure labels Jul 1, 2024
@westonruter westonruter added this to the performance-lab n.e.x.t milestone Jul 1, 2024
@swissspidy
Copy link
Member

It might help if we moved the two files closer together... Otherwise it's very easy to miss, as this issue shows

@westonruter
Copy link
Member Author

Yeah, maybe /phpunit-multisite.xml?

@westonruter
Copy link
Member Author

Or maybe we could generate it on the fly?

@swissspidy
Copy link
Member

How would you create it on the fly? 🤔 phpunit-multisite.xml seems fine, that's what everyone else typically does.

@westonruter
Copy link
Member Author

@swissspidy Like this: #1327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Issues for the overall performance plugin infrastructure [Type] Bug An existing feature is broken
2 participants