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

The file "index.xml" could not be found: Could not find any "index.xml" file in "/tmp/infection" #1474

Closed
ricardoboss opened this issue Jan 24, 2021 · 4 comments

Comments

@ricardoboss
Copy link

ricardoboss commented Jan 24, 2021

Question Answer
Infection version 0.20.2
Test Framework version PHPUnit 9.5.1
PHP version 8.0.1 w/ xdebug 3.0.2
Platform Windows & GitHub Actions Runner (Ubuntu latest)
Github Repo https://github.com/ricardoboss/Philly/tree/datastructures

When running infection without any arguments, I get an invalid PHPUnit configuration generated.

I think this issue is related to #1473.

phpunit.xml
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
        executionOrder="random">
   <coverage>
       <include>
           <directory suffix=".php">src/</directory>
       </include>
   </coverage>
   <testsuites>
       <testsuite name="Unit Tests">
           <directory>test/Unit/</directory>
       </testsuite>
   </testsuites>
</phpunit>
infection.json.dist
{
   "source": {
   	"directories": [
   		"src"
   	],
   	"excludes": [
   		"/.*Exception\\.php/",
   		"Exceptions/ExceptionHandler.php"
   	]
   },
   "logs": {
   	"text": "php:\/\/stdout",
   	"badge": {
   		"branch": "master"
   	}
   },
   "minMsi": 90,
   "minCoveredMsi": 100
}

Output with issue: https://github.com/ricardoboss/Philly/runs/1756185885?check_suite_focus=true#step:6

@ricardoboss
Copy link
Author

Didnt see the other issue is still open...

@ricardoboss ricardoboss changed the title Element 'filter': This element is not expected. The file "index.xml" could not be found: Could not find any "index.xml" file in "/tmp/infection" Jan 24, 2021
@iamsalnikov
Copy link

Hi! I had the same problem. Did you try to run it like this:

XDEBUG_MODE=coverage vendor/bin/infection

@ricardoboss
Copy link
Author

ricardoboss commented Apr 14, 2022

Yes, the linked issue already resolved this, that's why this issue is already closed.

@maks-rafalko
Copy link
Member

it should work without XDEBUG_MODE=coverage on the new Infection versions (I guess starting from 0.26.0), see #1518

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

No branches or pull requests

3 participants