You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this release several Maven settings and truststore helpers are added. These are addressable with following jenkins pipeline variables for which (if the library is added) help texts appear in Jenkins' pipeline steps help (#4, #6):
This adds Docker network support (#2) which automatically removes itself once the given body ends. This is addressable with following jenkins pipeline variable:
Besides the Docker network name there are also a number of parameters that you may or may not pass to the step.
113
+
114
+
| Parameter | optional? | Default | Description |
115
+
|-----------|-----------|---------|-------------|
116
+
|seleniumHubImage | optional | 'selenium/hub' | the Selenium Docker container images to be used from hub.docker.com.|
117
+
|seleniumVersion | optional | "3.141.59-zinc" | the Selenium Docker container image tag |
118
+
|workerImageFF | optional | "selenium/node-firefox" | the Selenium Firefox worker node Docker container image. This matches automatically with the given Selenium hub version. |
119
+
|workerImageChrome | optional | "selenium/node-chrome" | the Selenium Chrome worker node Docker container image. This matches automatically with the given Selenium hub version.|
120
+
|firefoxWorkerCount| mandatory if no Chrome worker is used | 0 | the number of Firefox containers that should be started for the test |
121
+
|chromeWorkerCount | mandatory if no Firefox worker is used | 0 | the number of Chrome containers that should be started for the test |
122
+
|hubPortMapping | optional | 4444 | the port under which the Selenium Hub should be available |
123
+
|debugSelenium | optional | false | set to `true` if you want your Jenkins run log to be filled with debug output |
124
+
125
+
Please note that `firefoxWorkerCount` AND `chromeWorkerCount` must not contain a value of zero. That would render the
126
+
test unusable because there would no one to execute the tests. In this case the body will not be executed and a
127
+
`ConfigurationException` will be thrown.
128
+
129
+
```groovy
130
+
// example for starting Selenium with a certain parameter with a groovy map.
131
+
// The rest of the parameters fallback to their defaults.
It is possible (although not necessary) to explicitly work with docker networks. This library supports the automatic creation and removal of a bridge network with a unique name.
51
149
52
-
### How
150
+
### Usage
53
151
54
152
`withZalenium` accepts now an optional network name the Zalenium container can attach to the given network. Conveniently a docker network can be created with this pipeline step which provides the dynamically created network name.
@@ -67,7 +166,7 @@ It is possible (although not necessary) to explicitly work with docker networks.
67
166
68
167
Often comes a Truststore into play while working with Jenkins and Java. Jenkins can accommodate necessary certificates in its truststore so Java applications like Maven (and others too!) can successfully interact with other parties, like download artifacts from artifact repositories or transport data over the network. Even so, it may be necessary to provide these Java applications with the right certificates when otherwise encrypted communication would fail without doing so.
69
168
70
-
## Simple Truststore pipeline
169
+
###Simple Truststore pipeline
71
170
72
171
For such circumstances this library provides a small snippet. The global `truststore` variable ensures that any truststore files which are copied in the process are also removed at the end of both `copy` and `use` actions.
73
172
@@ -106,23 +205,6 @@ node('anotherNode') {
106
205
}
107
206
```
108
207
109
-
## Locking
110
-
111
-
Right now, only one Job can run Zalenium Tests at a time.
112
-
This could be improved in the future.
113
-
114
-
### Why?
115
-
116
-
When multiple jobs executed we faced non-deterministic issues that the zalenium container was gone all of a sudden,
117
-
connections were aborted or timed out.
118
-
119
-
So we implemented a lock before starting zalenium that can only be passed by one job at a time.
120
-
It feels like this issue is gone now, but we're not sure if the lock was the proper fix.
121
-
122
-
### How?
123
-
124
-
We use the `lock` step of the [Lockable Resources Plugin](https://wiki.jenkins.io/display/JENKINS/Lockable+Resources+Plugin).
125
-
126
208
# Troubleshooting
127
209
128
210
The logs of the zalenium container are stored in `$WORKSPACE/zalenium-docker.log`.
0 commit comments