Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Docker Selenium | 6,671 | 3 days ago | 36 | other | Shell | |||||
Docker images for Selenium Grid | ||||||||||
Zalenium | 2,384 | 2 years ago | 37 | other | Java | |||||
A flexible and scalable container based Selenium Grid with video recording, live preview, basic auth & dashboard. | ||||||||||
Selenoid | 2,322 | 1 | 19 days ago | 3 | April 25, 2021 | 242 | apache-2.0 | Go | ||
Selenium Hub successor running browsers within containers. Scalable, immutable, self hosted Selenium-Grid on any platform with single binary. | ||||||||||
Blog | 1,521 | 2 months ago | 36 | JavaScript | ||||||
在这里写一些工作中遇到的前端,后端以及运维的问题 | ||||||||||
Udocker | 1,017 | 1 | 7 days ago | 6 | June 24, 2021 | 19 | apache-2.0 | Python | ||
A basic user tool to execute simple docker containers in batch or interactive systems without root privileges. | ||||||||||
Docker Ci Tool Stack | 770 | 4 years ago | 10 | mit | Groovy | |||||
Docker Infrastructure via docker-compose (Jenkins, SonarQube, Nexus, GitLab, Selenium Grid) | ||||||||||
Esim Cloud | 114 | 16 days ago | 73 | gpl-3.0 | JavaScript | |||||
A web-based system for designing and simulating electronic (eSim) and Arduino circuits. | ||||||||||
Pypownet | 88 | 3 months ago | 2 | lgpl-3.0 | Python | |||||
A power network simulator with a Reinforcement Learning-focused usage. | ||||||||||
Jppf | 49 | 11 | 5 | a year ago | 71 | May 31, 2020 | 8 | apache-2.0 | Java | |
The open source grid computing solution | ||||||||||
Rspec Capybara Docker Grid | 38 | 23 days ago | mit | Ruby | ||||||
A dockerized Selenium Grid with RSpec and Capybara |
Special thanks to Java Profiler for their encouragement on Open Source projects.
As the name suggests, this library is eventually going to end up becoming a simple prototype that can be enhanced to represent an "On-demand Grid" (which explains the reason behind the name just-ask ).
A static Grid (i.e., a hub and a fixed number of nodes) is a good start for setting up a remote execution infrastructure. But once the usage of the hub starts going up, problems start creeping up. Nodes go stale and start causing false failures for the tests and require constant maintenance (restart).
Some of it can be solved by embedding a "self healing" mechanism into the hub, but when it comes to scaling the Grid infrastructure this also does not help a lot.
just-ask is an on-demand grid, wherein there are no fixed nodes attached to the grid. As and when tests make hit the hub, a node is spun off, the test is routed to the node and after usage the node is cleaned up. The on-demand node can be a docker container that hosts a selenium node.
just-ask requires :
In order to consume just-ask for your straight forward on-demand grid needs, following instructions need to be followed:
jar-with-dependencies
. The latest released v{
"dockerRestApiUri": "http://192.168.43.130:2375",
"localhost": "0.0.0.0",
"dockerImagePort": "4444",
"volume": "/dev/shm:/dev/shm",
"maxSession": 5,
"mapping": [
{
"browser": "chrome",
"target": "selenium/standalone-chrome:3.14.0",
"implementation": "com.rationaleemotions.server.DockerBasedSeleniumServer"
},
{
"browser": "firefox",
"target": "selenium/standalone-firefox:3.14.0",
"implementation": "com.rationaleemotions.server.JvmBasedSeleniumServer"
}
],
"environment": {
"SCREEN_WIDTH": 1280,
"SCREEN_HEIGHT": 720
}
}
-Dconfig.file
is used to specify the
location of the JSON configuration file that we created above.)java -Dconfig.file=config.json -cp selenium-server-standalone-3.14.0.jar:just-ask-<VERSION>-jar-with-dependencies.jar \
org.openqa.grid.selenium.GridLauncherV3 -role hub -servlets com.rationaleemotions.servlets.EnrollServlet
Now wire in the Ghost Proxy into this on-demand hub by loading the URL : http://localhost:4444/grid/admin/EnrollServlet
That's about it. The On-demand Grid is now ready for use.
To run tests against the On-demand Grid you just instantiate a RemoteWebDriver
instance and then work with it.
Here's a sample that shows using chrome browser:
URL url = new URL("http://localhost:4444/wd/hub");
RemoteWebDriver driver = new RemoteWebDriver(url, DesiredCapabilities.chrome());
The meaning of each of the attributes of the JSON file is as below :
dockerRestApiUri
- Represents the Docker Rest API URI (could be unix:///var/run/docker.sock
or http://192.168.43.130:2375
).localhost
- Represents the hostname of the machine on which the Docker Daemon is running on (Its safe to leave
its value as 0.0.0.0
)dockerImagePort
- Represents the port number that is exposed inside the docker container.volume
- Represents a volume to be mounted. Can be left empty.maxSession
- Represents the maximum number of concurrent sessions that can be supported by the On-demand Hub
after which new test session requests will be queued.mapping
- Represents a set of key-value pairs wherein browser
represents the browser flavor
and target
represents the name of the docker image that is capable of supporting the respective browser
. The target
may not
be relevant to all implementation
values (for e.g., the target
is currently relevant ONLY for docker
based
on-demand nodes.)environment
- Represents environmental variable key-value pairs to be passed to docker containerimplementation
just-ask currently supports two implementation flavors :
com.rationaleemotions.server.DockerBasedSeleniumServer
- Indicates that for the browser in question, you would like
to leverage the Docker way of spinning off nodes on demand.com.rationaleemotions.server.JvmBasedSeleniumServer
- Indicates that for the browser in question, you would like
to leverage the JVM way of spinning off nodes on demand (i.e., the on-demand node would be a new JVM process.)In-case you would like to wire in your own Custom Server implementation, following is how it can be done :
just-ask is a Maven artifact. In order to consume it, you merely need to add the following as a dependency in your pom file.
<dependency>
<groupId>com.rationaleemotions</groupId>
<artifactId>just-ask</artifactId>
<version>1.0.5</version>
</dependency>
Now that you have added the above as a maven dependency, you build your own implementation of the Server, by
implementing the interface com.rationaleemotions.server.ISeleniumServer
.
After that, you can wire in your implementation via the implementation
attribute in the JSON configuration file
using the JVM argument -Dconfig.file
.
In order to get started with using this library here are the set of instructions that can be followed :
mvn clean package
just-ask-<VERSION>-jar-with-dependencies.jar
) in the directory that contains the
selenium server standalone.java -cp selenium-server-standalone-3.14.0.jar:just-ask-<VERSION>-jar-with-dependencies.jar org.openqa.grid.selenium.GridLauncherV3 -role hub -servlets com.rationaleemotions.servlets.EnrollServlet
http://localhost:4444/grid/admin/EnrollServlet
in a browser.Now the On-demand Grid is ready for use.