-
Notifications
You must be signed in to change notification settings - Fork 2
Add end-to-end CI testing with ESP32 emulation and Playwright #7
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: mdev
Are you sure you want to change the base?
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
- Add Playwright for browser automation testing - Create E2E test suite for WLED web UI pages - Add GitHub Actions workflow with Wokwi ESP32 simulation - Configure page load and JavaScript error detection tests - Add test documentation and npm scripts Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
- Enhanced simulator startup with detailed logging - Added Wokwi log collection in artifacts - Improved error handling and debugging output - Added comprehensive E2E testing documentation - Updated gitignore for Wokwi and Playwright artifacts - Documented Wokwi CLI token requirement Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
- Document ESP32 QEMU as alternative to Wokwi - Add Renode simulation option - Include mock server approach for UI-only testing - Provide migration guides between approaches Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
- Create comprehensive setup guide for repository admins - Document all files created and their purposes - Provide troubleshooting guide - Include instructions for adding Wokwi token - Ready for production use Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
|
@copilot Do you have to use Wokwi? What is the benefits over just using qemu? |
Good question! I chose Wokwi initially because: Wokwi advantages:
QEMU challenges:
However, QEMU is a valid alternative if licensing is a concern. I documented the approach in Would you prefer I switch to QEMU? I can implement it, but note:
The original issue mentioned "qemu" specifically - happy to switch if that's preferred, just want to ensure you're aware of the trade-offs. |
|
For WiFi to work, you must build WLED with the default WiFi network to connect up to as Wokwi-GUEST @copilot |
- Add workflow step to create my_config.h with Wokwi-GUEST WiFi credentials - Update documentation to include WiFi configuration requirement - Firmware now connects to Wokwi's simulated WiFi network for testing - Addresses requirement for WiFi setup in Wokwi simulator Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
Done! Added WiFi configuration in commit be1d643. The workflow now creates #define CLIENT_SSID "Wokwi-GUEST"
#define CLIENT_PASS ""This ensures the firmware connects to Wokwi's simulated WiFi network, making the web server accessible for testing. Updated all documentation to include this requirement. |
Implements automated E2E testing of WLED web UI served from simulated ESP32 firmware using Wokwi emulator and Playwright browser automation.
Implementation
GitHub Actions Workflow (
.github/workflows/e2e-test.yml)esp32dev_compattarget)my_config.h)Test Suite (
tests/e2e/ui-pages.spec.js)Configuration
test,test:ui,test:report@playwright/test,playwrightmy_config.hto connect to Wokwi-GUESTArchitecture
Tests run against actual firmware web server, not mocks. UI must be served from ESP32 due to backend coupling. The firmware is configured to connect to Wokwi's simulated WiFi network (Wokwi-GUEST) to make the web server accessible during testing.
Requirements
WOKWI_CLI_TOKENrequired (get from https://wokwi.com/dashboard/ci)Workflow triggers: pushes/PRs to
mdev/main, manual dispatch.Documentation
docs/E2E_TESTING.md- Testing overview and workflow detailsdocs/E2E_ALTERNATIVES.md- Alternative approaches (ESP32 QEMU, Renode)tests/e2e/README.md- Developer guideE2E_SETUP_COMPLETE.md- Admin setup instructionsAlternatives Documented
Open-source options available if Wokwi licensing is unsuitable:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.