Get the list of test that are going to be executed with a PHPUNIT configuration file

Francesco Panina

I've this simple question:

With the command

phpunit -c|--configuration <file>

It is possible specify a file which contains several phpunit configuration such as (but not limited to):

 <testsuites>
        <testsuite name="unit">
            <directory>path/to/directory/one</directory>
             <directory>path/to/directory/two</directory>
        </testsuite>
  </testsuites>

which will result in a list of tests to be executed.

While I'm not fully aware of phpunit internal implementation I'd like to retrieve in some way this 'list'.

Francesco Panina

To answer my own question:

If you look at the internal structure of PhpUnit the parser component is strongly coupled with the runner component invoked by the command.

This situation makes practically impossible to reuse the xml parser forcing you to either copy paste chunks of code or reimplement the parsing logic.

Long story short PhpUnit xml parsing logic is not reusable.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

PHPUnit "No Tests Executed" if I enable test string comparison

분류에서Dev

How to get currently executed Cucumber test scenario title and step text

분류에서Dev

Override Class in PHPUnit Feature Test

분류에서Dev

AngularJS - Unit test for http get to JSON file

분류에서Dev

select list disabling going wrong

분류에서Dev

PHPUnit 테스트 중 file_get_contents 관련 GitLab-CI 문제

분류에서Dev

how is the output going to get displayed?

분류에서Dev

How to Unit Test Type Hint with PHPUnit

분류에서Dev

How to run PHPUnit test with its dependencies

분류에서Dev

Test with PHPUnit Laravel 5 controller with database (Mock?)

분류에서Dev

PhpUnit giving errror at second test function

분류에서Dev

best way to get folder and file list in Javascript

분류에서Dev

.bashrc doesn't get executed

분류에서Dev

Ajax Form Begin is not going to http GET method

분류에서Dev

Hibernate Configuration without configuration file

분류에서Dev

Can Malicious Code Be Executed From A CSS File?

분류에서Dev

Unable to get a multi line query executed

분류에서Dev

"Xterm" or "xterm" in configuration file

분류에서Dev

How to add more items to the list without going to the next row?

분류에서Dev

"systemctl list-timers" shows last executed dates that are far in the future

분류에서Dev

Command Line, File Name for each script executed. SQL

분류에서Dev

How to enable user actions after .bat file is executed

분류에서Dev

How to protect configuration file in PHP?

분류에서Dev

using admin configuration in model file

분류에서Dev

Find command associated with configuration file

분류에서Dev

Regular expression to parse configuration file

분류에서Dev

Configuration file for kernel in VM environment

분류에서Dev

documentId resolving code doesn't get executed XPages

분류에서Dev

setInterval doesn't get cleared, function keeps getting executed

Related 관련 기사

  1. 1

    PHPUnit "No Tests Executed" if I enable test string comparison

  2. 2

    How to get currently executed Cucumber test scenario title and step text

  3. 3

    Override Class in PHPUnit Feature Test

  4. 4

    AngularJS - Unit test for http get to JSON file

  5. 5

    select list disabling going wrong

  6. 6

    PHPUnit 테스트 중 file_get_contents 관련 GitLab-CI 문제

  7. 7

    how is the output going to get displayed?

  8. 8

    How to Unit Test Type Hint with PHPUnit

  9. 9

    How to run PHPUnit test with its dependencies

  10. 10

    Test with PHPUnit Laravel 5 controller with database (Mock?)

  11. 11

    PhpUnit giving errror at second test function

  12. 12

    best way to get folder and file list in Javascript

  13. 13

    .bashrc doesn't get executed

  14. 14

    Ajax Form Begin is not going to http GET method

  15. 15

    Hibernate Configuration without configuration file

  16. 16

    Can Malicious Code Be Executed From A CSS File?

  17. 17

    Unable to get a multi line query executed

  18. 18

    "Xterm" or "xterm" in configuration file

  19. 19

    How to add more items to the list without going to the next row?

  20. 20

    "systemctl list-timers" shows last executed dates that are far in the future

  21. 21

    Command Line, File Name for each script executed. SQL

  22. 22

    How to enable user actions after .bat file is executed

  23. 23

    How to protect configuration file in PHP?

  24. 24

    using admin configuration in model file

  25. 25

    Find command associated with configuration file

  26. 26

    Regular expression to parse configuration file

  27. 27

    Configuration file for kernel in VM environment

  28. 28

    documentId resolving code doesn't get executed XPages

  29. 29

    setInterval doesn't get cleared, function keeps getting executed

뜨겁다태그

보관