How to Set up Selenium Grid using Command Line

How to Set up Selenium Grid using Command Line

FullStackHero

3 года назад

362 Просмотров

Grid roles
Several components compose a Selenium Grid. Depending on your needs, you can start each one of them on its own, or a few at the same time by using a Grid role.

Standalone
Standalone is the union of all components, and to the user’s eyes, they are executed as one. A fully functional Grid of one is available after starting it in the Standalone mode.

Standalone is also the easiest mode to spin up a Selenium Grid. By default, the server will be listening on http://localhost:4444, and that’s the URL you should point your RemoteWebDriver tests. The server will detect the available drivers that it can use from the System PATH.

java -jar selenium-server- version.jar standalone

Hub and Node(s)
It enables the classic Hub & Node(s) setup. These roles are suitable for small and middle-sized Grids.

Hub
A Hub is the union of the following components:

Router
Distributor
Session Map
New Session Queue
Event Bus
java -jar selenium-server-"version".jar hub

By default, the server will be listening on http://localhost:4444, and that’s the URL you should point your RemoteWebDriver tests.

Node(s)
One or more Nodes can be started in this setup, and the server will detect the available drivers that it can use from the System PATH.

java -jar selenium-server-"version".jar node
Distributed
On Distributed mode, each component needs to be started on its own. This setup is more suitable for large Grids.

The startup order of the components is not important, however, we recommend following these steps when starting a distributed Grid.
Event Bus: serves as a communication path to other Grid components in subsequent steps.
java -jar selenium-server-"version".jar event-bus
Session Map: responsible for mapping session IDs to the Node where the session is running.
java -jar selenium-server-"version".jar sessions
New Session Queue: adds the new session request to a queue, then the distributor processes it.
java -jar selenium-server-"version".jar sessionqueue
Distributor: Nodes register to it, and assigns a Node for a session request.
java -jar selenium-server-"version".jar distributor --sessions http://localhost:5556 --sessionqueue http://localhost:5559 --bind-bus false
Router: the Grid entrypoint, in charge of redirecting requests to the right component.
java -jar selenium-server-"version".jar router --sessions http://localhost:5556 --distributor http://localhost:5553 --sessionqueue http://localhost:5559

Тэги:

#Angular #javascript #Router #typescript #pipe #services #pure_pipe #RXjs #interviewquestion #hindi #Angular_guru #Directives #Lazy_module #Feature_Modules #Components #india #pune #mumbai #benglore #delhi #reactjs #learn #UI_developer #frontenet_developer
Ссылки и html тэги не поддерживаются


Комментарии: