allure-phpunit icon indicating copy to clipboard operation
allure-phpunit copied to clipboard

[v2] Use external config instead of arguments in phpunit.xml

Open remorhaz opened this issue 4 years ago • 5 comments

External config will be much more extendable and will virtually never break BC. The only optional argument will be the path to config (which will set by default to config/allure.phpunit.config.php).

remorhaz avatar Nov 17 '21 12:11 remorhaz

@remorhaz Thanks for your great work on this! It looks cool!

I have an issue with it outputting the reports to paths relative to the test rather than relative to the project path. Do you think this will fix that?

mikepsinn avatar Dec 12 '21 16:12 mikepsinn

Well, @mikepsinn, could you please provide more information about your configuration and library versions?

remorhaz avatar Dec 13 '21 13:12 remorhaz

@remorhaz Thanks for the reply! :D

I'm still using PHPUnit 7.5.20, so maybe that's the issue.

I'm using allure-phpunit 1.2.4.

I've tried using both of the configs below. It's not a super-big deal, so I hate to take up your time with it. I was just curious if your new implementation might fix it.

Thanks!

    <listeners>
	    <listener class="Yandex\Allure\Adapter\AllureAdapter" file="vendor/allure-framework/allure-phpunit/src/Yandex/Allure/Adapter/AllureAdapter.php">
		    <arguments>
			    <string>build/logfiles/allure</string> <!-- Output directory -->
			    <boolean>true</boolean> <!-- Whether to delete previous results on rerun -->
		    </arguments>
	    </listener>
    </listeners>
    <listeners>
	    <listener class="Yandex\Allure\Adapter\AllureAdapter" file="vendor/allure-framework/allure-phpunit/src/Yandex/Allure/Adapter/AllureAdapter.php">
		    <arguments>
			    <string>./build/logfiles/allure</string> <!-- Output directory -->
			    <boolean>true</boolean> <!-- Whether to delete previous results on rerun -->
		    </arguments>
	    </listener>
    </listeners>

mikepsinn avatar Dec 14 '21 21:12 mikepsinn

I'm still using PHPUnit 7.5.20

That's quite old version. Our v2 prototype supports only PHPUnit 9/PHP 8. Allure extension just uses directory that is set by PHPUnit, maybe old versions of the tool had some bug, but I think that as a first step to solution you should update your environment.

remorhaz avatar Dec 15 '21 11:12 remorhaz