You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code coverage in these tests is generated manually, since the code under test is run in a different process than PHPUnit itself.
For API tests it's not too bad, as the whole server runs in one process, dumping coverage at the end.
However, it requires running tests with just one web worker, and code executed in job workers, is not considered covered.
For CLI tests, the problem is slightly different. In those, every test spins a new process to run a specific command.
That means every command needs to read the coverage generated so far, merge it to the one generated during that command, and persist it for the next command.
That has a big performance impact, and has the implication that commands cannot be run in parallel.
Both problems could be solved by letting every process generate its own coverage report in PHP format, in isolation, whether it is a command, a web worker or a job worker.
Then, if all tests pass, we separately merge all reports, generating the final one in the requested format.
The text was updated successfully, but these errors were encountered:
Code coverage in these tests is generated manually, since the code under test is run in a different process than PHPUnit itself.
For API tests it's not too bad, as the whole server runs in one process, dumping coverage at the end.
However, it requires running tests with just one web worker, and code executed in job workers, is not considered covered.
For CLI tests, the problem is slightly different. In those, every test spins a new process to run a specific command.
That means every command needs to read the coverage generated so far, merge it to the one generated during that command, and persist it for the next command.
That has a big performance impact, and has the implication that commands cannot be run in parallel.
Both problems could be solved by letting every process generate its own coverage report in PHP format, in isolation, whether it is a command, a web worker or a job worker.
Then, if all tests pass, we separately merge all reports, generating the final one in the requested format.
The text was updated successfully, but these errors were encountered: