Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit test execution commands #1157

Open
wants to merge 5 commits into
base: release/next
Choose a base branch
from

Conversation

bbakalov
Copy link
Contributor

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.

markshust and others added 4 commits April 25, 2024 12:18
Co-authored-by: Michael Lehmkuhl <michael@electricpulp.com>
Co-authored-by: Jenyamba <is3kv3@ukr.net>
Co-authored-by: Tu Van <vandinhtuit@gmail.com>
Co-authored-by: Cid Lopes <alannettto@gmail.com>
Copy link

what-the-diff bot commented May 15, 2024

PR Summary

  • Introduction of a dedicated file for Unit Testing
    A new file called compose/bin/test/unit has been added. This allows developers to perform unit tests on the software, making sure individual components are working properly. It contains useful help messages and options to point to the exact test location, enhancing the test execution process.

  • Addition of a File for Unit Test Coverage Report
    Another new file, compose/bin/test/unit-coverage, has been introduced. This is targeted at generating detailed reports that show how much of the software code is being tested. It also incorporates help instructions and enables specifying the test location. Using this, we can improve the quality of our tests and ensure more robust software.

  • New File for running Unit Tests with xdebug
    Also added is a file named compose/bin/test/unit-xdebug. This file aids in executing unit tests with the Xdebug utility turned on. Xdebug is a powerful tool that assists in debugging and profiling the code. This file, too, comes with integrated help guidance and the ability to direct the test path, thus providing a more effective debugging experience.

@bbakalov
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants