Hi community,
I have structured my mobile automation framework using UiPath Test Manager + Sauce Labs.
I have multiple reusable workflows (Login → App actions → Logout), and I invoke these workflows to form individual test cases. To optimize execution when running multiple test cases together in a Test Set, I implemented logic at the start of each test case to:
- Check if a mobile session is already active
- If yes, continue execution without logging in again
- If no, trigger the login workflow and create a new session
This approach works well when executing test cases sequentially from a Test Set, as it avoids repeated logins.
However, I’m facing a design challenge:
Since test cases should also be independent, when I execute a single test case individually, the mobile session remains open after execution and has to be closed manually. This creates inconsistency between:
- Individual test case execution (session stays open)
My question is:
What is the recommended best practice in UiPath for managing mobile/Appium sessions so that:
- Test cases remain independent
- Sessions can be reused efficiently during Test Set execution
- Sessions are properly closed when a test case is executed independently?
Looking for guidance on framework design or UiPath-supported patterns to handle this scenario cleanly.
Thanks in advance!