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

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:
- What is the recommended way to run tests only for one module?
- How to properly limit code coverage scope to just that module (e.g.,
src/Pyz/Client/Foo
)? - Is there a better way to generate HTML or text coverage reports for a single module without memory issues?
0
Answers
-
Have you taken a look at the docs and given a try to some other options?
Another shortcut is to go inside the folder tests/PyzTest/Client/Foo and execute
codecept run
inside it0 -
Thanks @Hidran Arias , Here I am able to run the test cases but the main problem is code coverage report, It's taking too long and in last fails with memory error.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 86 Spryker News
- 989 Developer Corner
- 838 Spryker Development
- 92 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 36 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 33 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 33 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random