Comments (3)
A possible workaround may be to create phpunit.xml
so that all tests are run when no arguments are passed to the phpunit
command.
My environment:
OS: Ubuntu Server 18.04.3
php: 7.2.24
phpunit: 8.5.2
Here, phpunit
was installed locally via composer
1.9.3, so the command is ./vendor/bin/phpunit
. After installing the extension, in the Test Explorer I could run tests individually or run all tests in an entire class. But clicking "run all tests" (the "play" button) results in all tests appearing as failed in the Test Explorer, and the output just shows phpunit
usage as described above.
The workaround is to create phpunit.xml
as follows:
<phpunit bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="mySuite">
<directory>tests</directory>
</testsuite>
</testsuites>
</phpunit>
The command line effect is that ./vendor/bin/phpunit
with no arguments runs all the tests. And the "run all tests" button now seems to work in the Test Explorer: all tests show as passed.
from vscode-phpunit.
I'm rewriting this project now, it will fix this issue at next version
from vscode-phpunit.
yes! it needs phpunit.xml to run all tests!
try version 3.0, some problems are resolved
from vscode-phpunit.
Related Issues (20)
- Tests status not updating in tests explorer HOT 3
- phpunit.paths setting doesn't resolve path mapping HOT 6
- docker: invalid reference format HOT 3
- Tests are not being detected
- json5 to jsonc in README.md to match vscode's settings.json format
- Problem with path to the test file HOT 2
- Command-line options are not recognized by phpunit HOT 1
- Extension causes high cpu load
- Editor is read-only because the file system of the file is read-only HOT 4
- Not showing all test classes HOT 2
- Could not open input file on Mac HOT 2
- Issue when cwd has spaces in directory name HOT 1
- Option to Remove --teamcity Command-line Argument HOT 1
- phpunit.paths mapping not working with warden/den HOT 1
- Don't show test as failed when failOnRisky and failOnWarning are set to false HOT 1
- Debug test with xdebug HOT 1
- Feature request: adding exclaimation mark to test with warnings to help spotting them
- Extension does not work with PHP 8.3
- Spawn Error HOT 2
- Open VSX version is outdated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-phpunit.