-
Notifications
You must be signed in to change notification settings - Fork 334
Unity runner and parser for unit testing feature #1681
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
base: master
Are you sure you want to change the base?
Conversation
Download the artifacts for this pull request: |
Pull request has been marked as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment regarding the use of "console" for warnings and errors instead of using "Logger" and noticed some console.logs as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed Working on Windows, Ubuntu and MacOS environment.
It is a quicker interface to run the unit tests.
Description
Remove dependency to pytest, read serial output directly to parse unit test results.
This pull request introduces a new infrastructure for running ESP-IDF unit tests using the Unity test framework over a serial connection. The main changes include implementing a serial port capture utility, a Unity test output parser, and a test runner that orchestrates the process. The existing unit test adapter is refactored to use these new components, enabling more robust and accurate test execution and reporting directly from the device.
Serial communication and Unity test orchestration:
UnitySerialCapture
class to handle serial communication with ESP32 devices, including connecting, capturing output, performing hardware resets, and sending commands to the device.UnityTestRunner
class to manage the test execution flow, interact with the serial capture, and parse test results from device output.Unity test result parsing and types:
UnityParser
class for parsing Unity test framework output into structured test result objects, supporting both individual and multiple test results.types.ts
.Integration with existing unit test adapter:
adapter.ts
to use the new Unity test runner, including serial port selection, baud rate configuration, and improved error handling for test execution. [1] [2]adapter.ts
to support new functionality. [1] [2]Type of change
Steps to test this pull request
Configure a ESP-IDF project with unit tests. Review unit-testing
Test should be executed without pytest. Output is shown in test output.
How has this been tested?
Manual testing as described above.
Test Configuration:
Checklist