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

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

Open
remorhaz opened this issue Nov 17, 2021 · 5 comments
Open

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

remorhaz opened this issue Nov 17, 2021 · 5 comments

Comments

@remorhaz
Copy link
Contributor

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).

@mikepsinn
Copy link

@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?

@remorhaz
Copy link
Contributor Author

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

@mikepsinn
Copy link

@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>

@remorhaz
Copy link
Contributor Author

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.

@nishant04412
Copy link

nishant04412 commented Oct 21, 2024

@remorhaz I believe with PHPUnit 10 this is even more difficult to extend current allure-framework. More info is #106

There is a PR #107 as well to address this.

Can you please check and advise ?

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

No branches or pull requests

3 participants