Skip to content

Commit 87a8f08

Browse files
authored
[e2e] Setup selenoid for multithreading (#3609)
* add browserSetup * add browserSetup * upd browserSetup * upd browserSetup * upd browserSetup * upd browserSetup * upd browserSetup * upd read me
1 parent 1bcdec4 commit 87a8f08

File tree

30 files changed

+334
-255
lines changed

30 files changed

+334
-255
lines changed

.github/workflows/e2e-automation.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Pull with Docker
3737
id: pull_chrome
3838
run: |
39-
docker pull selenium/standalone-chrome:103.0
39+
docker pull selenoid/vnc_chrome:103.0
4040
- name: Set up JDK
4141
uses: actions/setup-java@v3
4242
with:
@@ -52,6 +52,7 @@ jobs:
5252
id: compose_app
5353
# use the following command until #819 will be fixed
5454
run: |
55+
docker-compose -f kafka-ui-e2e-checks/docker/selenoid-git.yaml up -d
5556
docker-compose -f ./documentation/compose/e2e-tests.yaml up -d
5657
- name: Run test suite
5758
run: |
@@ -78,7 +79,7 @@ jobs:
7879
uses: Sibz/[email protected]
7980
with:
8081
authToken: ${{secrets.GITHUB_TOKEN}}
81-
context: "Test report"
82+
context: "Click Details button to open Allure report"
8283
state: "success"
8384
sha: ${{ github.sha }}
8485
target_url: http://kafkaui-allure-reports.s3-website.eu-central-1.amazonaws.com/${{ github.run_number }}

.github/workflows/e2e-checks.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ jobs:
1515
- uses: actions/checkout@v3
1616
with:
1717
ref: ${{ github.event.pull_request.head.sha }}
18-
- name: Configure AWS credentials for Kafka-UI account
18+
- name: Configure AWS credentials
1919
uses: aws-actions/configure-aws-credentials@v2
2020
with:
2121
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
2222
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
2323
aws-region: eu-central-1
24-
- name: Set the values
24+
- name: Set up environment
2525
id: set_env_values
2626
run: |
2727
cat "./kafka-ui-e2e-checks/.env.ci" >> "./kafka-ui-e2e-checks/.env"
28-
- name: pull docker
28+
- name: Pull with Docker
2929
id: pull_chrome
3030
run: |
31-
docker pull selenium/standalone-chrome:103.0
31+
docker pull selenoid/vnc_chrome:103.0
3232
- name: Set up JDK
3333
uses: actions/setup-java@v3
3434
with:
@@ -40,12 +40,13 @@ jobs:
4040
run: |
4141
./mvnw -B -ntp versions:set -DnewVersion=${{ github.event.pull_request.head.sha }}
4242
./mvnw -B -V -ntp clean install -Pprod -Dmaven.test.skip=true ${{ github.event.inputs.extraMavenOptions }}
43-
- name: compose app
43+
- name: Compose with Docker
4444
id: compose_app
4545
# use the following command until #819 will be fixed
4646
run: |
47+
docker-compose -f kafka-ui-e2e-checks/docker/selenoid-git.yaml up -d
4748
docker-compose -f ./documentation/compose/e2e-tests.yaml up -d
48-
- name: e2e run
49+
- name: Run test suite
4950
run: |
5051
./mvnw -B -ntp versions:set -DnewVersion=${{ github.event.pull_request.head.sha }}
5152
./mvnw -B -V -ntp -Dsurefire.suiteXmlFiles='src/test/resources/smoke.xml' -f 'kafka-ui-e2e-checks' test -Pprod
@@ -65,7 +66,7 @@ jobs:
6566
AWS_S3_BUCKET: 'kafkaui-allure-reports'
6667
AWS_REGION: 'eu-central-1'
6768
SOURCE_DIR: 'allure-history/allure-results'
68-
- name: Post the link to allure report
69+
- name: Deploy report to Amazon S3
6970
if: always()
7071
uses: Sibz/[email protected]
7172
with:

.github/workflows/e2e-weekly.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Pull with Docker
2424
id: pull_chrome
2525
run: |
26-
docker pull selenium/standalone-chrome:103.0
26+
docker pull selenoid/vnc_chrome:103.0
2727
- name: Set up JDK
2828
uses: actions/setup-java@v3
2929
with:
@@ -39,6 +39,7 @@ jobs:
3939
id: compose_app
4040
# use the following command until #819 will be fixed
4141
run: |
42+
docker-compose -f kafka-ui-e2e-checks/docker/selenoid-git.yaml up -d
4243
docker-compose -f ./documentation/compose/e2e-tests.yaml up -d
4344
- name: Run test suite
4445
run: |
@@ -65,7 +66,7 @@ jobs:
6566
uses: Sibz/[email protected]
6667
with:
6768
authToken: ${{secrets.GITHUB_TOKEN}}
68-
context: "Test report"
69+
context: "Click Details button to open Allure report"
6970
state: "success"
7071
sha: ${{ github.sha }}
7172
target_url: http://kafkaui-allure-reports.s3-website.eu-central-1.amazonaws.com/${{ github.run_number }}

documentation/compose/e2e-tests.yaml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ services:
1111
test: wget --no-verbose --tries=1 --spider http://localhost:8080/actuator/health
1212
interval: 30s
1313
timeout: 10s
14-
retries: 10
14+
retries: 10
1515
depends_on:
16-
kafka0:
17-
condition: service_healthy
18-
schemaregistry0:
19-
condition: service_healthy
20-
kafka-connect0:
21-
condition: service_healthy
16+
kafka0:
17+
condition: service_healthy
18+
schemaregistry0:
19+
condition: service_healthy
20+
kafka-connect0:
21+
condition: service_healthy
2222
environment:
2323
KAFKA_CLUSTERS_0_NAME: local
2424
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka0:29092
@@ -33,10 +33,10 @@ services:
3333
hostname: kafka0
3434
container_name: kafka0
3535
healthcheck:
36-
test: unset JMX_PORT && KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka0 -Dcom.sun.management.jmxremote.rmi.port=9999" && kafka-broker-api-versions --bootstrap-server=localhost:9092
37-
interval: 30s
38-
timeout: 10s
39-
retries: 10
36+
test: unset JMX_PORT && KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka0 -Dcom.sun.management.jmxremote.rmi.port=9999" && kafka-broker-api-versions --bootstrap-server=localhost:9092
37+
interval: 30s
38+
timeout: 10s
39+
retries: 10
4040
ports:
4141
- "9092:9092"
4242
- "9997:9997"
@@ -68,12 +68,12 @@ services:
6868
- 8085:8085
6969
depends_on:
7070
kafka0:
71-
condition: service_healthy
71+
condition: service_healthy
7272
healthcheck:
73-
test: ["CMD", "timeout", "1", "curl", "--silent", "--fail", "http://schemaregistry0:8085/subjects"]
74-
interval: 30s
75-
timeout: 10s
76-
retries: 10
73+
test: [ "CMD", "timeout", "1", "curl", "--silent", "--fail", "http://schemaregistry0:8085/subjects" ]
74+
interval: 30s
75+
timeout: 10s
76+
retries: 10
7777
environment:
7878
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka0:29092
7979
SCHEMA_REGISTRY_KAFKASTORE_SECURITY_PROTOCOL: PLAINTEXT
@@ -93,11 +93,11 @@ services:
9393
- 8083:8083
9494
depends_on:
9595
kafka0:
96-
condition: service_healthy
96+
condition: service_healthy
9797
schemaregistry0:
98-
condition: service_healthy
98+
condition: service_healthy
9999
healthcheck:
100-
test: ["CMD", "nc", "127.0.0.1", "8083"]
100+
test: [ "CMD", "nc", "127.0.0.1", "8083" ]
101101
interval: 30s
102102
timeout: 10s
103103
retries: 10
@@ -118,16 +118,16 @@ services:
118118
CONNECT_INTERNAL_VALUE_CONVERTER: org.apache.kafka.connect.json.JsonConverter
119119
CONNECT_REST_ADVERTISED_HOST_NAME: kafka-connect0
120120
CONNECT_PLUGIN_PATH: "/usr/share/java,/usr/share/confluent-hub-components"
121-
# AWS_ACCESS_KEY_ID: ""
122-
# AWS_SECRET_ACCESS_KEY: ""
121+
# AWS_ACCESS_KEY_ID: ""
122+
# AWS_SECRET_ACCESS_KEY: ""
123123

124124
kafka-init-topics:
125125
image: confluentinc/cp-kafka:7.2.1
126126
volumes:
127127
- ./message.json:/data/message.json
128128
depends_on:
129129
kafka0:
130-
condition: service_healthy
130+
condition: service_healthy
131131
command: "bash -c 'echo Waiting for Kafka to be ready... && \
132132
cub kafka-ready -b kafka0:29092 1 30 && \
133133
kafka-topics --create --topic users --partitions 3 --replication-factor 1 --if-not-exists --bootstrap-server kafka0:29092 && \
@@ -142,10 +142,10 @@ services:
142142
ports:
143143
- 5432:5432
144144
healthcheck:
145-
test: ["CMD-SHELL", "pg_isready -U dev_user"]
145+
test: [ "CMD-SHELL", "pg_isready -U dev_user" ]
146146
interval: 10s
147147
timeout: 5s
148-
retries: 5
148+
retries: 5
149149
environment:
150150
POSTGRES_USER: 'dev_user'
151151
POSTGRES_PASSWORD: '12345'
@@ -154,7 +154,7 @@ services:
154154
image: ellerbrock/alpine-bash-curl-ssl
155155
depends_on:
156156
postgres-db:
157-
condition: service_healthy
157+
condition: service_healthy
158158
kafka-connect0:
159159
condition: service_healthy
160160
volumes:
@@ -164,7 +164,7 @@ services:
164164
ksqldb:
165165
image: confluentinc/ksqldb-server:0.18.0
166166
healthcheck:
167-
test: ["CMD", "timeout", "1", "curl", "--silent", "--fail", "http://localhost:8088/info"]
167+
test: [ "CMD", "timeout", "1", "curl", "--silent", "--fail", "http://localhost:8088/info" ]
168168
interval: 30s
169169
timeout: 10s
170170
retries: 10
@@ -174,7 +174,7 @@ services:
174174
kafka-connect0:
175175
condition: service_healthy
176176
schemaregistry0:
177-
condition: service_healthy
177+
condition: service_healthy
178178
ports:
179179
- 8088:8088
180180
environment:

kafka-ui-e2e-checks/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This repository is for E2E UI automation.
2727
```
2828
git clone https://github.com/provectus/kafka-ui.git
2929
cd kafka-ui-e2e-checks
30-
docker pull selenoid/vnc:chrome_86.0
30+
docker pull selenoid/vnc_chrome:103.0
3131
```
3232

3333
### How to run checks
@@ -36,6 +36,7 @@ docker pull selenoid/vnc:chrome_86.0
3636

3737
```
3838
cd kafka-ui
39+
docker-compose -f kafka-ui-e2e-checks/docker/selenoid-local.yaml up -d
3940
docker-compose -f documentation/compose/e2e-tests.yaml up -d
4041
```
4142

@@ -51,6 +52,14 @@ docker-compose -f documentation/compose/e2e-tests.yaml up -d
5152
-Dbrowser=local
5253
```
5354

55+
Expected Location of Chrome
56+
```
57+
Linux: /usr/bin/google-chrome1
58+
Mac: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
59+
Windows XP: %HOMEPATH%\Local Settings\Application Data\Google\Chrome\Application\chrome.exe
60+
Windows Vista and newer: C:\Users%USERNAME%\AppData\Local\Google\Chrome\Application\chrome.exe
61+
```
62+
5463
### Qase integration
5564

5665
Found instruction for Qase.io integration (for internal use only) at `kafka-ui-e2e-checks/QASE.md`
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1+
---
12
version: '3'
23

34
services:
5+
46
selenoid:
57
network_mode: bridge
68
image: aerokube/selenoid:1.10.7
79
volumes:
810
- "../selenoid/config:/etc/selenoid"
911
- "/var/run/docker.sock:/var/run/docker.sock"
10-
- "../selenoid/video:/video"
12+
- "../selenoid/video:/opt/selenoid/video"
1113
- "../selenoid/logs:/opt/selenoid/logs"
1214
environment:
13-
- OVERRIDE_VIDEO_OUTPUT_DIR=video
14-
command: [ "-conf", "/etc/selenoid/browsers.json", "-video-output-dir", "/opt/selenoid/video", "-log-output-dir", "/opt/selenoid/logs" ]
15+
- OVERRIDE_VIDEO_OUTPUT_DIR=../selenoid/video
16+
command: [ "-conf", "/etc/selenoid/browsersGit.json", "-video-output-dir", "/opt/selenoid/video", "-log-output-dir", "/opt/selenoid/logs" ]
1517
ports:
1618
- "4444:4444"
1719

@@ -22,10 +24,10 @@ services:
2224
- selenoid
2325
ports:
2426
- "8081:8080"
25-
command: [ "--selenoid-uri", "http://localhost:4444" ]
27+
command: [ "--selenoid-uri", "http://selenoid:4444" ]
2628

2729
selenoid-chrome:
2830
network_mode: bridge
29-
image: selenoid/vnc:chrome_96.0
31+
image: selenoid/vnc_chrome:103.0
3032
extra_hosts:
3133
- "host.docker.internal:host-gateway"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
version: '3'
3+
4+
services:
5+
6+
selenoid:
7+
network_mode: bridge
8+
image: aerokube/selenoid:1.10.7
9+
volumes:
10+
- "../selenoid/config:/etc/selenoid"
11+
- "/var/run/docker.sock:/var/run/docker.sock"
12+
- "../selenoid/video:/opt/selenoid/video"
13+
- "../selenoid/logs:/opt/selenoid/logs"
14+
environment:
15+
- OVERRIDE_VIDEO_OUTPUT_DIR=../selenoid/video
16+
command: [ "-conf", "/etc/selenoid/browsersLocal.json", "-video-output-dir", "/opt/selenoid/video", "-log-output-dir", "/opt/selenoid/logs" ]
17+
ports:
18+
- "4444:4444"
19+
20+
selenoid-ui:
21+
network_mode: bridge
22+
image: aerokube/selenoid-ui:latest-release
23+
links:
24+
- selenoid
25+
ports:
26+
- "8081:8080"
27+
command: [ "--selenoid-uri", "http://selenoid:4444" ]
28+
29+
selenoid-chrome:
30+
network_mode: bridge
31+
image: selenoid/vnc_chrome:103.0
32+
extra_hosts:
33+
- "host.docker.internal:host-gateway"

kafka-ui-e2e-checks/pom.xml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@
1717
<testcontainers.version>1.17.6</testcontainers.version>
1818
<httpcomponents.version>5.2.1</httpcomponents.version>
1919
<selenium.version>4.8.1</selenium.version>
20-
<selenide.version>6.11.2</selenide.version>
20+
<selenide.version>6.12.3</selenide.version>
2121
<testng.version>7.7.0</testng.version>
2222
<allure.version>2.21.0</allure.version>
23-
<qase.io.version>3.0.3</qase.io.version>
23+
<qase.io.version>3.0.4</qase.io.version>
2424
<aspectj.version>1.9.9.1</aspectj.version>
2525
<assertj.version>3.24.2</assertj.version>
2626
<hamcrest.version>2.2</hamcrest.version>
27-
<slf4j.version>1.7.36</slf4j.version>
28-
<dotenv.version>2.3.1</dotenv.version>
27+
<slf4j.version>2.0.5</slf4j.version>
2928
<kafka.version>3.3.1</kafka.version>
3029
</properties>
3130

@@ -122,6 +121,11 @@
122121
<artifactId>selenium</artifactId>
123122
<version>${testcontainers.version}</version>
124123
</dependency>
124+
<dependency>
125+
<groupId>org.projectlombok</groupId>
126+
<artifactId>lombok</artifactId>
127+
<version>${org.projectlombok.version}</version>
128+
</dependency>
125129
<dependency>
126130
<groupId>org.apache.httpcomponents.core5</groupId>
127131
<artifactId>httpcore5</artifactId>
@@ -132,6 +136,11 @@
132136
<artifactId>httpclient5</artifactId>
133137
<version>${httpcomponents.version}</version>
134138
</dependency>
139+
<dependency>
140+
<groupId>org.seleniumhq.selenium</groupId>
141+
<artifactId>selenium-http-jdk-client</artifactId>
142+
<version>${selenium.version}</version>
143+
</dependency>
135144
<dependency>
136145
<groupId>org.seleniumhq.selenium</groupId>
137146
<artifactId>selenium-http</artifactId>
@@ -187,16 +196,6 @@
187196
<artifactId>slf4j-simple</artifactId>
188197
<version>${slf4j.version}</version>
189198
</dependency>
190-
<dependency>
191-
<groupId>org.projectlombok</groupId>
192-
<artifactId>lombok</artifactId>
193-
<version>${org.projectlombok.version}</version>
194-
</dependency>
195-
<dependency>
196-
<groupId>io.github.cdimascio</groupId>
197-
<artifactId>dotenv-java</artifactId>
198-
<version>${dotenv.version}</version>
199-
</dependency>
200199
<dependency>
201200
<groupId>com.provectus</groupId>
202201
<artifactId>kafka-ui-contract</artifactId>

0 commit comments

Comments
 (0)