Skip to content

Add Page Transactions implementation using Guará framework#8

Open
douglasdcm wants to merge 3 commits into
gunesmes:masterfrom
douglasdcm:master
Open

Add Page Transactions implementation using Guará framework#8
douglasdcm wants to merge 3 commits into
gunesmes:masterfrom
douglasdcm:master

Conversation

@douglasdcm
Copy link
Copy Markdown

Hi, congratulations for the repository. This Merge Request introduces the Page Transactions architectural pattern to the repository using the Guará framework.
While the traditional Page Object Model (POM) excels at mapping structural elements and selectors, it often leads to low-level step duplication inside test scripts. This implementation introduces a business-centric layer (Transactions) that encapsulates end-to-end user behaviors while reusing your existing LoginPage and MainPage objects underneath.

Key Changes

  • Introduced transactions/ directory: Isolated domain logic into single-responsibility classes (UserInMainPage and UserLogin).
  • Added test_login_transaction.py: A clean, readable test case decoupled from UI implementation details.
  • Zero breaking changes: No existing tests or original Page Objects were modified, ensuring full backward compatibility.

Architectural Benefits

  1. Behavior-Driven Design: By using Guará’s fluent API (given, when, then), the test script reads like pure documentation, bridging the gap between business requirements and automation.
  2. SRP (Single Responsibility Principle): Page Objects remain exclusively responsible for UI elements, while Transactions focus solely on executing full user workflows.
  3. Enhanced Maintainability: If a user flow changes (e.g., adding an intermediate step during login), you only update the Transaction class once, rather than fixing dozens of scattered test cases.

References:
Guará Framework Videos: https://www.youtube.com/playlist?list=PLR5jeODwvciLaJErpM4PNXnKvLRe9Hc53
Guará Documentation: https://guara.readthedocs.io/en/latest/index.html
Page Transactions documentation: https://guara.readthedocs.io/en/latest/THE_PATTERN_EXPLAINED.html

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

Successfully merging this pull request may close these issues.

1 participant