Local Grid Utility

This utility enables you to launch and shutdown a Selenium 2 Grid instance that manages five PhantomJS sessions.

License

License

Categories

Categories

Utility General Purpose Libraries
GroupId

GroupId

com.nordstrom.ui-tools
ArtifactId

ArtifactId

local-grid-utility
Last Version

Last Version

1.3.3
Release Date

Release Date

Type

Type

jar
Description

Description

Local Grid Utility
This utility enables you to launch and shutdown a Selenium 2 Grid instance that manages five PhantomJS sessions.
Project URL

Project URL

https://github.com/Nordstrom/local-grid-utility
Source Code Management

Source Code Management

https://github.com/Nordstrom/local-grid-utility/tree/master

Download local-grid-utility

How to add to project

<!-- https://jarcasting.com/artifacts/com.nordstrom.ui-tools/local-grid-utility/ -->
<dependency>
    <groupId>com.nordstrom.ui-tools</groupId>
    <artifactId>local-grid-utility</artifactId>
    <version>1.3.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.nordstrom.ui-tools/local-grid-utility/
implementation 'com.nordstrom.ui-tools:local-grid-utility:1.3.3'
// https://jarcasting.com/artifacts/com.nordstrom.ui-tools/local-grid-utility/
implementation ("com.nordstrom.ui-tools:local-grid-utility:1.3.3")
'com.nordstrom.ui-tools:local-grid-utility:jar:1.3.3'
<dependency org="com.nordstrom.ui-tools" name="local-grid-utility" rev="1.3.3">
  <artifact name="local-grid-utility" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.nordstrom.ui-tools', module='local-grid-utility', version='1.3.3')
)
libraryDependencies += "com.nordstrom.ui-tools" % "local-grid-utility" % "1.3.3"
[com.nordstrom.ui-tools/local-grid-utility "1.3.3"]

Dependencies

compile (3)

Group / Artifact Type Version
com.nordstrom.ui-tools : selenium-foundation jar 17.5.1-s2
com.codeborne : phantomjsdriver jar 1.3.0
com.beust : jcommander jar 1.48

Project Modules

There are no modules declared in this project.

Maven Central

local-grid-utility

This utility enables you to launch and shutdown a Selenium 2 Grid instance that manages five PhantomJS sessions.

Launch Local Grid

In one step, local-grid-utility launches a Selenium Grid hub and a single node that supplies PhantomJS sessions:

java -jar local-grid-utility.jar

The driver for the PhantomJS browser requires access to a compatible binary. By default, local-grid-utility will search for the PhantomJS binary on the file search path. To provide a specific path from which to load the binary, set the phantomjs.binary.path system property:

java -Dphantomjs.binary.path=C:\tools\drivers\phantomjs.exe -jar local-grid-utility.jar

Example

The following is the output from launching a local Grid collection:

$ java -jar local-grid-utility.jar
15:21:04.063 [main] INFO org.eclipse.jetty.util.log - Logging initialized @5864ms
http://192.168.0.16:4444/wd/hub

Note that the last line of the output provides the URL from which to request remote driver sessions.

Shut Down Local Grid

To shut down the local Grid collection, specify the -shutdown option:

java -jar local-grid-utility.jar -shutdown

This command shuts down the Grid hub and all attached nodes.

Command Line Options

  • -port : specify port for local hub server (default = 4444)
  • -shutdown : shut down active local Grid collection
  • -workingDir : working directory for servers
  • -logsFolder : server output logs folder (default = "logs")
  • -noRedirect : disable server output redirection (default = false)

Notes

The port used by the node server that supplies PhantomJS sessions is auto-selected via the PortProber.findFreePort() method of the selenium-remote-driver library.

Unless disabled with the noRedirect option, local-grid-utility redirects the output of the hub and node servers to log files in a logs folder under the current working directory. Each log file contains the output from a single launch of its associated server. Log file names are auto-incremented to avoid overwriting or appending to the output of previous launches.

  • grid-hub*.log for hub server output
  • grid-node*.log for node server output

The default output folder can be overridden with the logsFolder option, specifying either absolute or relative path. If a relative path is specified, or the default ("logs") is accepted, logs are written to a sub-folder of the current working directory, which can be overridden with the workingDir option.

com.nordstrom.ui-tools

Nordstrom, Inc.

Nordstrom, Inc. is a specialty fashion retailer, headquartered in Seattle, Washington

Versions

Version
1.3.3
1.3.2
1.3.1
1.3.0
1.2.2
1.2.1
1.2.0
1.1.2
1.1.1