Type of Doc:
Magento 2 version:
Notifications of Changes:
Hi!
When creating a PR on the magento2 repo, there are a bunch of automated tests which get executed. But there currently doesn't seem to be a clear explanation of how to execute these tests yourself.
It would be nice if we have some documentation which says how to run those tests, so we can already prepare the PR ourselves to get accepted faster and not having to go back and forth and wait until the automated tests have run after changing something.
There is already some good documentation around how to run unit tests, but the other tests (static tests for example) are not documented properly I think. There is this page, which says to call bin/magento dev:tests:run static, but that doesn't seem to give the same results as the static tests ran through automatisation.
For example, I created a PR https://github.com/magento/magento2/pull/22733 which apparently failed on some static tests. And then a Magento developer fixed those. Which is great btw, but I would like to be able to see those failures myself and fix them myself if possible before creating the PR.
When asking how to execute these static test, I didn't get a very clear answer, so I went looking in the documentation where to find information regarding that and I couldn't find anything around it (unless I missed it somehow).
Thanks!
@hostep, great request! I'm working with @dmanners on a set of Beginner Guides and the wiki for Magento2 repo to document some of this information. I've assigned myself to the ticket, and will work towards that content.
I'll also make sure this is linked/noted in the Contributor Guide in DevDocs.
We've covered the Issue process. Next is PR! More info soon for this one.
Exactly the issue that I face at the moment.
It is not clear how and what is running behind the curtains on the new private CI setup (no logs?).
I can second this request. The instructions on running tests are quite confusing at the moment.
Is it for core code? Is it for custom code in app/code? Are you supposed to use the phpcs/phpunit commands or dev:tests:run? What's up with Magento ignoring Magento2.Files.LineLength.MaxExceeded when the Magento2 standard actually throws Generic.Files.LineLength.TooLong? Why is the Magento2 coding standard failing on core code? Why is Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis being thrown when running phpcs with --standard=Magento2 even though that's clearly against Magento's standards. And so on...
Hi @hostep. Do you think that #7951 takes care of this issue?
Maybe, I'll try to check it out later when I find some more time, sorry 馃檪