Use cases for Appium on Selenium Grid


#1

Sometime back, I worked on setting up Appium tests execution on a Selenium Grid environment. Was able to run parallel tests across 5 devices at a time (4 Android, 1 iOS). We also arrived at a set of use cases to achieve a self-maintaining Grid setup, but could not work on all of them at that time. I am sharing the use cases here, just in case if anyone had already worked on them, we can discuss more

Its a pretty out-dated one though.

Purpose and Scope:
– This Use Case is to implement a self-maintaining, customized Grid environment for the parallel execution of Selenium/Appium tests.
– The user should be able to run tests on multiple browsers & platforms like Android and iOS devices simultaneously.
Common Pre-Conditions:
– The test scripts should be sourced at the HUB machine.
– Hubs should be able to control the limit of the number of nodes they can support.
– Hubs and Nodes on the Grid should be customizable.
– JSON files should be used to configure the Hub & Node grid parameters.
– TestNG xml files should be used to drive the test execution on grid.

UC 1: Run Parallel tests on Grid – Register ‘N’ nodes and run tests:

User should be able to register a Hub with N nodes – N/2 for android and N/2 for iOS devices.

Multiple tests should be distributed to these nodes matching the capability and executed successfully.

UC 2: Run Parallel tests on Grid – Add nodes to existing environment:

User should be able to register a Hub with N nodes – N/2 for android and N/2 for iOS devices.

Users should be able to scale the Grid by adding another set of N nodes to the Hub.

Multiple tests should be distributed to these nodes matching the capability and executed successfully.

UC 3: Run Parallel tests on Grid – Register nodes after launching the test:

User should be able to register a Hub and trigger test execution.  

If user registers a node, tests matching the capability set in the node should be executed successfully.

UC 4: Run Parallel tests on Grid – Prioritization of tests

User should be able to register a Hub with a custom prioritizer to run Android tests first and then call tests on iOS devices.  

User should be able to register N nodes on this hub and run tests.

Multiple tests should be distributed to these nodes matching the capability and executed successfully.

UC 5: Run Parallel tests on Grid – Update node configuration and Re-register on Hub

User should be able to register a Hub with N nodes – N/2 for android and N/2 for iOS devices. User should be able to update the configuration of the existing nodes and re-register it on the Hub.

Multiple tests should be distributed to these nodes matching the capability and executed successfully.

UC 6: Run Parallel tests on Grid – Register nodes using –hubHost and -hubPort

User should be able to register a Hub with default configuration and register nodes by specifying the Hub information using parameters –hubHost and –hubPort.

User should be able to register N nodes on this hub and run tests.

Multiple tests should be distributed to these nodes matching the capability and executed successfully.

UC 7: Run Parallel tests on Grid – De-Register nodes if not alive

User should be able to register a Hub with default configuration. User should be able to register N nodes on this hub and run tests.

If a node is down or not alive for a specific period, it should be automatically de-registered from the
Hub.

UC 8: Run Parallel tests on Grid – Register Hub using Customized Capability

User should be able to register a Hub with customized capability that can locate a node with a Node Name. User should be able to register N nodes on this hub and run tests

Multiple tests should be distributed to these nodes matching the capability and executed successfully.

UC 9: Run Parallel tests on Grid – Print all nodes registered to a Hub

User should be able to register a Hub with customized servlets that can list all the nodes registered into it.

User should be able to register N nodes on this hub and run tests

Multiple tests should be distributed to these nodes matching the capability and executed successfully.

UC 10: Run Parallel tests on Grid – Access & store logs of nodes

User should be able to register a Hub with default configuration and register nodes with customized servlets that can read all the logs from the nodes and display.

User should be able to register N nodes on this hub and run tests

Multiple tests should be distributed to these nodes matching the capability and executed successfully.