How to run tests for a single module in Spryker and generate code coverage reports?

Options
mitkumar.dudani.nagar
mitkumar.dudani.nagar Spryker Solution Partner Posts: 7 🧑🏻‍🚀 - Cadet

I'm working with a Spryker project and trying to run unit/integration tests for a specific module, for example:

vendor/bin/codecept run --coverage-html -c tests/PyzTest/Client/Foo

The issue I'm facing:

  • It runs very slowly or even crashes due to memory exhaustion (especially with coverage enabled).
  • I suspect that code coverage is not scoped properly, and it might be scanning the entire project.

I want to know:

  1. What is the recommended way to run tests only for one module?
  2. How to properly limit code coverage scope to just that module (e.g., src/Pyz/Client/Foo)?
  3. Is there a better way to generate HTML or text coverage reports for a single module without memory issues?

Answers