docs icon indicating copy to clipboard operation
docs copied to clipboard

Document how to run code coverage with phpunit

Open tswfi opened this issue 2 years ago • 5 comments

Questions Answers
Branch? 8.x
Description? Document how to run coverage tests with phpunit
Fixed ticket?

tswfi avatar Nov 24 '21 16:11 tswfi

yup, added few more steps and links to more information

tswfi avatar Dec 07 '21 18:12 tswfi

I'm afraid I'm not a docker expert so I need @PierreRambaud to review this contribution

I don't get the relation between docker and code coverage. Above there is no mention of docker. Here's is how you manage to make it work for your environment. If you want to explain something it should be easier and better to only talk about ./vendor/bin/phpunit not the environment you're working on

PierreRambaud avatar Dec 13 '21 08:12 PierreRambaud

docker environment is a "sure" way to get a working environment and running the tests inside the container makes everybody run the tests the same way.

The devdocs has information on how to get the docker environment up: https://devdocs.prestashop.com/8/contribute/contribute-pull-requests/contribute_using_docker/#install-prestashop-core and using the same environment to run the tests is simple for everybody.

One could argue that all the documentation should be done on top of the docker environment to have "one way of doing things" and if someone wants to do something else then they will probably know enough to do it.

tswfi avatar Dec 13 '21 08:12 tswfi

The part I'm missing is:

If you use Docker env [...]

Not everyone runs docker env, and you can simply have native env prepared. Maybe we should make sure to mention it?

kpodemski avatar Apr 07 '22 20:04 kpodemski

Hello @thomasnares here is an interesting question: should this content be added to doc or not ? 😅 we could not find the answer in 2021

matks avatar Oct 18 '22 19:10 matks