Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project architecture #15

Open
NickAb opened this issue Sep 28, 2015 · 0 comments
Open

Project architecture #15

NickAb opened this issue Sep 28, 2015 · 0 comments

Comments

@NickAb
Copy link
Contributor

NickAb commented Sep 28, 2015

While this project is in early stage I thought it might be a good idea to discuss overall architecture and choose an approach for further development.

The project consists of two major components:

  • The Driver, that runs on the host system and is responsible for managing emulators/devices, app under test deployment and staff like that.
  • The automation Agent, that runs on the emulator/device and is responsible for actual automation of app under test.

I see three general approaches in building communication between these two components:

Driver Agent Notes
1 Server (JSWP) Server (RPC) Currently used in Winium projects.
2 Server (JSWP) Client (WebSockets) Agent has to connect to special endpoint on Driver. Driver uses two-way communications.
3 Server (JSWP Proxy) Server (JSWP) Similar to the first option, but agent implements full JSWP protocol. See facebook/WebDriverAgent

Here are some thoughts on each option.

1. Server (JSWP) → Server (RPC)

  • Does not require implementing JSWP compatibility on both ends (Driver and Agent)
  • Used in other Winium projects, appium-android-bootstrap
  • Agent cannot be used without Driver directly from Selenium tests
  • Agent is a server, i.e. requires a port to be bound to (ports are forwarded to host, complicating simultaneous run of multiple agents on multiple emulators on same host), etc.
  • But we can use non-network RPC, for exapmle file based RPC if it is possible in cases of Agent (it is possible in Winium.StoreApps, where Agent is a part of the app under test)

2. Server (JSWP) ↔ Client (WebSockets)

  • Does not require implementing JSWP compatibility on both ends (Driver and Agent)
  • Does not require port to be bound to
  • Two-way communications, which might be used for example for some extended functionality in inspector
  • Agent cannot be used without Driver directly from Selenium tests

3. Server (JSWP Proxy) → Server (JSWP)

  • Agent can be used directly without host Driver (except for deployment of agent, which can be done once (if it is stable enough))
  • Kinda inevitable good separation of concerns: we have JSWP compatibly agent that can be used directly, we have emulator/devices management tool (similar to facebook/FBSimulatorControl), and simple JSWP proxy that overrides NewSession and a couple of other commands.
  • Agent is a server, i.e. requires a port to be bound to (ports are forwarded to host, complicating simultaneous run of multiple agents on multiple emulators on same host), etc.
  • Requires implementing JSWP compatibility on both sides
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant