docker-magento icon indicating copy to clipboard operation
docker-magento copied to clipboard

Add unit test execution commands

Open bbakalov opened this issue 1 year ago • 3 comments

The new pull of commands for simplifying unit test execution:

bin/test/unit

Usage: bin/test/unit <unit_test_path> Description: Run specific unit tests

bin/test/unit-coverage

Usage: bin/test/unit-coverage <unit_test_path> Description: Generate unit tests coverage report in the folder: dev/tests/unit/report

bin/test/unit-xdebug

Usage: bin/test/unit-xdebug <unit_test_path> Description: Run unit tests with xdebug (you need to turn on xdebug in IDE as usual). Works natively with configured xdebug within docker-magento.

bbakalov avatar May 15 '24 13:05 bbakalov

PR Summary

  • Updated Documentation Updated README.md file to include instructions for new bin/test commands. These commands facilitate developers in running tests and generating reports.

  • New Bash Scripts We have introduced new bash scripts that comprise:

    • bin/test/unit: This utility enables running specific unit tests.
    • bin/test/unit-coverage: A convenient tool for generating and displaying unit test coverage reports
    • bin/test/unit-xdebug: Helpful in running unit tests with the Xdebug tool switched on. This functionality aids in efficient debugging processes.

These additions enhance testing and debugging capabilities of the development environment.

what-the-diff[bot] avatar May 15 '24 13:05 what-the-diff[bot]

Hello @markshust

I'm sure these commands simplify the use of unit tests.

I added a new folder 'test' to the 'bin' folder. The general idea is to simplify and combine test scripts in one folder. I'm not sure if this approach aligns with your thoughts, but let's find the best place for it.

Also, it works well with configured xdebug (as you configured it in the academy video). So potentially, it should work without any problems from scratch.

bbakalov avatar May 15 '24 13:05 bbakalov

@markshust Hello. Please check idea that I provided.

bbakalov avatar Jun 19 '24 01:06 bbakalov

This is an awesome addition, thanks so much @bbakalov!

The only thing we need is the README documentation updated to account for these updates.

markshust avatar Nov 13 '24 20:11 markshust