VS Code Extension for Ceedling Testing and Coverage (v0.1)
This VS Code extension provides a seamless way to run Ceedling tests, generate coverage reports, and visualize code coverage directly in the editor. It also includes functionality to update the launch.json file for debugging Ceedling tests. Note that this extension is in version 0.1, and some issues or limitations may exist. The repository is not yet publicly available.
Features
Run Ceedling Tests:
Run Ceedling tests for the currently open test file with a single button click.
Automatically cleans, builds, and runs tests using the ceedling command.
Generates GCOV coverage reports.
Visualize Code Coverage:
Parses .gcov files to highlight covered and uncovered lines in the editor.
Covered lines are highlighted in green, and uncovered lines are highlighted in red.
Update launch.json for Debugging:
Automatically generates or updates the launch.json file with a debugging configuration for Ceedling tests.
Starts debugging using the configured ceedlingtest launch configuration with a button click.
Button-Based Interface:
All functionality is accessible through buttons in the VS Code interface for ease of use.
Installation
Prerequisites:
Ensure you have Ceedling installed and configured in your project.
The extension is currently in version 0.1, and the repository is not yet available for public use. Stay tuned for updates!
Usage
Buttons
The extension provides the following buttons for easy access to its features:
Debug Ceedling:
Updates the launch.json file with a debugging configuration for Ceedling tests and starts debugging.
Run Ceedling Tests:
Runs Ceedling tests for the currently open test file and generates coverage reports.
Coverage Data:
Parses the .gcov file for the currently open file and highlights covered and uncovered lines in the editor.
Example Workflow
Include the .c File:
Ensure the .c file you want to test is included in your workspace.
Open a Test File:
Open a Ceedling test file (e.g., test_my_code.c).
Run Tests:
Click the Run Ceedling Tests button to execute the tests and generate coverage reports.
Visualize Coverage:
Click the Coverage Data button to visualize the coverage in the editor.
Debug Tests:
Click the Debug Ceedling button to debug the test file.
Known Issues (v0.1)
Limited Error Handling: The extension may not handle all edge cases gracefully.
Platform Compatibility: The extension has been tested on limited environments and may require adjustments for different setups.
Performance: Parsing large .gcov files may be slow.
Feedback and Support
Since this extension is in its early stages (v0.1), your feedback is invaluable! If you encounter any issues or have suggestions for improvement, please reach out to the developer. The repository will be made available once the extension is more stable.
License
This project will be licensed under the MIT License. Stay tuned for the repository release for more details.
Acknowledgments
Ceedling for providing a great testing framework for C projects.
VS Code API for enabling the development of powerful extensions.
Enjoy testing and debugging your C projects with ease! 🚀