WIP: SWTBot test case: Debug flow Test
Description
Add SWTBot test case to check Debug flow Fixes # (IEP-989)
Type of change
- SWTBot test
How has this been tested?
- Run SWTBot test
Checklist
- [X] PR Self Reviewed
- [X] Applied Code formatting
- [ ] Added Documentation
- [ ] Added Unit Test
- [ ] Verified on all platforms - Windows,Linux and macOS
Summary by CodeRabbit
- Tests
- Added an automated SWTBot UI test validating the end-to-end ESP-IDF project debug workflow: project creation, build, port selection, flashing, and debug configuration selection.
- Runs on Linux (other platforms are skipped); includes environment setup/teardown and ensures cleanup after each run.
- Improves regression coverage and confidence around flashing and debug-related user scenarios.
Walkthrough
Adds a new SWTBot JUnit4 UI test class that sets up the environment, creates an ESP‑IDF project, toggles launch settings, builds, selects serial/target, flashes and verifies success, and prepares a debug launch on Linux; non‑Linux runs a trivial short‑circuit assertion.
Changes
| Cohort / File(s) | Summary of Changes |
|---|---|
New SWTBot UI testtests/com.espressif.idf.ui.test/src/com/espressif/idf/ui/test/executable/cases/project/IDFProjectDebugProcessTest.java |
Adds IDFProjectDebugProcessTest with @BeforeClass setup, @After teardown, and a Linux-only @Test that creates an ESP‑IDF project, disables "Open Serial Monitor After Flashing", builds, selects serial port, flashes and verifies success, then selects debug configuration/target (debug launch lines commented out). Uses an internal Fixture and existing helpers (EnvSetupOperations, ProjectTestOperations, LaunchBarConfigSelector/LaunchBarTargetSelector, TestWidgetWaitUtility). |
Sequence Diagram(s)
sequenceDiagram
autonumber
participant T as Test (IDFProjectDebugProcessTest)
participant F as Fixture
participant Env as EnvSetupOperations
participant Proj as ProjectTestOperations
participant LCfg as LaunchBarConfigSelector
participant LTgt as LaunchBarTargetSelector
participant IDE as Eclipse UI
rect rgba(230,240,255,0.5)
Note over T: Linux-only test path
T->>F: beforeTestClass()
F->>Env: initializeEnvironment()
Env-->>F: ready
end
T->>F: createNewProject()
F->>Proj: createIDFProject()
Proj-->>F: project created
T->>LCfg: openLaunchConfig()
LCfg->>IDE: uncheck "Open Serial Monitor After Flashing"
IDE-->>LCfg: setting saved
T->>Proj: buildProject()
Proj-->>T: build success
T->>Proj: selectSerialPort()
Proj-->>T: port selected
T->>Proj: flashProject()
Proj-->>T: flash success verified
T->>LCfg: selectDebugConfiguration()
LCfg-->>T: debug config selected
T->>LTgt: selectTargetBoard()
LTgt-->>T: target selected
alt Debug steps (commented out)
Note over T,IDE: Debug launch interactions prepared but not executed
end
T->>F: afterEachTest()
F->>Env: cleanup()
Env-->>F: cleaned
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
- espressif/idf-eclipse-plugin#1299 — Adds related SWTBot E2E tests and reuses the same ProjectTestOperations and LaunchBar selectors referenced by this test.
- espressif/idf-eclipse-plugin#1300 — Adds similar SWTBot UI tests for flash/debug workflows following the same Fixture and helper patterns.
- espressif/idf-eclipse-plugin#1304 — Modifies LaunchBarTargetSelector and ProjectTestOperations utilities that this test depends on.
Suggested reviewers
- kolipakakondal
- alirana01
Poem
I tap my paws on keys so neat,
A project hums with flashing beat.
On Linux slopes I build and bind,
Ports and targets neatly lined.
Breakpoints wait — I hop, I cheer! 🐇✨
Pre-merge checks and finishing touches
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | ⚠️ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | You can run @coderabbitai generate docstrings to improve docstring coverage. |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title Check | ✅ Passed | The title directly references the main change by indicating an SWTBot test for the debug flow, which matches the addition of the new UI test class. It concisely conveys the core intent of the pull request, even though it includes a “WIP” prefix and a redundant “Test” suffix. The essential information is clear and specific to the changeset. There are no misleading or unrelated terms. |
✨ Finishing touches
- [ ] 📝 Generate Docstrings
🧪 Generate unit tests
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
- [ ] Commit unit tests in branch
IEP-989
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.