Skip to content

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

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.

Activity

  1. added
    gssocThis issue was assigned as a part of GSSoC 2025 contribution.
    on Jul 22, 2025
  2. CodingWithAlaa commented on Jul 22, 2025

    @CodingWithAlaa

    Please assign this to me

  3. PrakharDoneria commented on Jul 23, 2025

    @PrakharDoneria
    MemberAuthor

    Both @lakkilohitha and @CodingWithAlaa are assigned with the issue.

  4. PrakharDoneria commented on Jul 24, 2025

    @PrakharDoneria
    MemberAuthor

    It's nice to see a report on the project Karbon, thanks @lakkilohitha
    But as per the issue suggested, you may implement some custom test cases to check similar issues.
    Kindly refer to issue once again.

  5. Rachel602144 commented on Aug 2, 2025

    @Rachel602144
    Contributor

    hey @PrakharDoneria
    i, as a GSSoC'25 contributor, would love to work on this issue, hence please assign it to me!
    thanks

  6. PrakharDoneria commented on Aug 2, 2025

    @PrakharDoneria
    MemberAuthor

    @Rachel602144 added as contributor

  7. AshaSaini-033 commented on Sep 22, 2025

    @AshaSaini-033

    hey @PrakharDoneria
    i, as a GSSoC'25 contributor, would love to work on this issue, hence please assign it to me!
    thanks

  8. PrakharDoneria commented on Sep 23, 2025

    @PrakharDoneria
    MemberAuthor

    Added @AshaSaini-033 as contributor

  9. AshaSaini-033 commented on Sep 23, 2025

    @AshaSaini-033

    hii @PrakharDoneria i am little bit confused how would i see the issue is corrected or not ?

  10. PrakharDoneria commented on Sep 23, 2025

    @PrakharDoneria
    MemberAuthor

    Submit a PR, if that fixes the issue then it will be closed and PR will be merged.
    @AshaSaini-033

  11. AshaSaini-033 commented on Sep 23, 2025

    @AshaSaini-033

    @PrakharDoneria sir I submitted the PR please check it

  12. AshaSaini-033 commented on Sep 25, 2025

    @AshaSaini-033

    @PrakharDoneria sir please give me feedback because i submitted the pr

  13. PrakharDoneria commented on Sep 25, 2025

    @PrakharDoneria
    MemberAuthor

    Please have some patience. @AshaSaini-033

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

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

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions