Skip to content

Implement UI Tests (End-to-End/Acceptance Tests) #19

@PrakharDoneria

Description

@PrakharDoneria

To ensure that "Karbon - AI Web Builder" functions correctly from an end-user perspective, automated UI (User Interface) tests should be implemented. These tests will simulate user interactions with the Tkinter GUI and verify that the application behaves as expected, covering full user workflows.

Proposed Solution:

  • Choose a GUI Testing Framework: Research and select a suitable Python GUI testing framework for Tkinter applications. Options might include:
    • PyAutoGUI (for basic screen interaction, less robust for complex UIs).
    • More specialized libraries if available that can inspect Tkinter widgets directly.
    • Alternatively, if a more robust solution isn't found, consider a hybrid approach where some UI actions trigger underlying functions that are unit/integration tested.
  • Define Key User Scenarios: Identify critical user journeys to test:
    • Launching the application, entering a prompt, clicking "Generate," and verifying preview update.
    • Using "Clear" and "Surprise Me" buttons.
    • Attempting to export a project and verifying file creation.
    • Testing error and success notifications.
    • (If implemented) Interacting with the code editor or customizable layout.
  • Simulate User Actions: Write tests that simulate keyboard inputs, mouse clicks, and window resizing.
  • Verify UI State and Content: Assert that UI elements are in the correct state (e.g., buttons enabled/disabled), text labels are accurate, and the preview content reflects the expected output.
  • Run in a Headless Environment (if possible): For CI/CD, explore running UI tests in a headless environment to avoid requiring a graphical display.

Benefits:

  • User-Centric Validation: Ensures the application works correctly from the perspective of an actual user.
  • Catch UI Regressions: Detects issues where UI elements are broken, misplaced, or non-functional after code changes.
  • High Confidence in Releases: Provides the highest level of assurance that the entire application, including its user interface, is ready for deployment.
  • Automated Acceptance Criteria: Serves as automated acceptance criteria for new features.

Metadata

Metadata

Labels

GSSoC25This issue was assigned as a part of GSSoC 2025 contribution.assignedAlready assigned to one of the contributormediumMedium level tasktestingTest cases

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions