Code Monkey home page Code Monkey logo

Comments (3)

sfsccn avatar sfsccn commented on July 19, 2024 7

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.

recca0120 avatar recca0120 commented on July 19, 2024 2

I'm rewriting this project now, it will fix this issue at next version

from vscode-phpunit.

recca0120 avatar recca0120 commented on July 19, 2024

yes! it needs phpunit.xml to run all tests!

try version 3.0, some problems are resolved

from vscode-phpunit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.