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

Integration Proposal for Software Testing using Wokwi Simulator CI in esp-idf-lib #623

Open
1 task done
hayschan opened this issue Mar 25, 2024 · 0 comments
Open
1 task done

Comments

@hayschan
Copy link
Contributor

The issue

Hello esp-idf-lib Maintainers and Community,

As an active user and contributor to the esp-idf-lib project, I've recognized the project's significant impact on facilitating the development of embedded and IoT applications. The library's comprehensive support for a myriad of components, sensors, and ICs is commendable. However, the current Continuous Integration (CI) system primarily focuses on compiling the code without executing any form of automated tests to validate the functionality of these components under various conditions.

The context

I propose the integration of Wokwi CI into our CI pipeline to bridge this gap. Wokwi, an advanced simulator for Arduino and ESP projects, supports a wide range of components and sensors, making it a perfect fit for our testing needs. More so, Wokwi's ability to simulate custom components—demonstrated through my development of a driver for an unsupported I2C sensor model (Custom Component Example)—provides us with the flexibility to test even the most niche parts of our library.

The integration process involves leveraging Wokwi CI's GitHub Actions to execute automated tests for each pull request or push to the repository. This would not only streamline our testing process but also enhance our library's reliability and usability for developers worldwide.

Possible solution

The technical benefits of integrating Wokwi CI include:

  1. Automated Testing: Enabling automated, simulated runs of our components' interaction with various sensors and ICs, ensuring that each component behaves as expected across different scenarios without the need for physical hardware. For the ESP32 MCU, WokWi supports ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6, ESP32-H2, which should be enough for our use case.
  2. Native components: If the sensor or IC is natively supported, that would be the least amount of workload. Wokwi supports a wide range of components and sensors.
  3. Custom Component Simulation: Even not supported, Utilizing Wokwi's custom components feature allows us to extend our testing capabilities to include every sensor and IC supported by esp-idf-lib, regardless of Wokwi's native support. I've already developed a driver for an I2C sensor not officially supported by Wokwi and utilized the custom components feature for testing (see my driver here).
  4. Enhanced Reliability: By simulating real-world applications, we can identify and rectify potential issues early in the development cycle, significantly reducing the likelihood of bugs reaching production.

I am keen to collaborate with the maintainer team to define the integration specifics and contribute to the implementation of this proposal. Your feedback and suggestions on this proposal would be highly appreciated.

Thank you for considering this enhancement to our project's development process.

Confirmation

  • This report is not a bug report in code, a question, nor a request for drivers.
@hayschan hayschan changed the title Integration Proposal for Advanced Software Testing using Wokwi CI in esp-idf-lib Integration Proposal for Software Testing using Wokwi Simulator CI in esp-idf-lib Mar 25, 2024
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

No branches or pull requests

1 participant