Skip to content

Feature Proposal: Support for Record and Replay Backend Traffic #44

@aniket-k-mukherjee

Description

@aniket-k-mukherjee

Summary:
We propose to enhance the Appium Interceptor Plugin with the ability to add multiple records simultaneously and replay them in the order they were originally captured. This feature aims to provide a more robust and flexible way to mock backend interactions during app automation, ensuring a controlled and consistent environment for UI testing.

Problem Statement:
Currently, backend dependencies can create challenges in maintaining a stable and reliable test environment, particularly for sanity test suites. Variability in backend responses can lead to inconsistent test results, which complicates the automation process and impacts test accuracy.

Proposed Solution:
1.⁠ ⁠Support for Multiple Records:

  • Allow users to add multiple records at once.
  • Replays the recorded responses in the exact order they were captured.
  • This capability will enable testers to mock the entire backend during app automation, simulating real-world scenarios without relying on live backend services.

2.⁠ ⁠Introduction of Default Mocks:

  • Provide an option to set defaultMocks for specific APIs.
  • These mocks will return a static response every time the API is called from the UI.
  • For scenarios where an API is called multiple times (e.g., 5 times), the corresponding 5 predefined responses will be returned in sequence, mimicking real backend behavior.

Benefits:
•⁠ ⁠Backend Independence: Removes dependencies on backend services, enabling a more reliable and isolated test environment.
•⁠ ⁠Consistent Testing: Ensures a stable and consistent UI testing experience by simulating backend interactions with predetermined responses.
•⁠ ⁠Enhanced Test Automation: Creates a more suitable and effective sanity test suite by providing predictable and controlled testing conditions.

If this proposal is accepted, we have a working solution ready for implementation which we are currently using in our organisation, and we can raise a PR to contribute this functionality.

Looking forward to your feedback!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions