-
-
Notifications
You must be signed in to change notification settings - Fork 87
805 lines (745 loc) · 50.4 KB
/
gradle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
name: Vividus CI
on:
push:
branches:
- master
tags:
- release-[0-9]+.[0-9]+.[0-9]+
paths:
- '**/**'
- '!docs/**'
- '!*.md'
- '!.github/workflows/docs.yml'
pull_request:
branches:
- master
paths:
- '**/**'
- '!docs/**'
- '!*.md'
- '!.github/workflows/docs.yml'
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
env:
TEST_APP_VERSION: 0.6.0
runs-on: ${{ matrix.platform }}
permissions:
contents: read
packages: write
steps:
- name: Checkout (including submodules and tags)
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Cache ~/.gradle/caches
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Cache ~/.gradle/wrapper
uses: actions/cache@v4
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('vividus-build-system/**/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-wrapper-
- name: Cache tests history
if: github.ref == 'refs/heads/master' && matrix.platform == 'ubuntu-latest'
uses: actions/cache@v4
with:
save-always: true
path: vividus-tests/output/history
key: tests-history-cache-${{ github.sha }}
restore-keys: |
tests-history-cache-
- name: Set up JDK 23
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 23
- name: Warm up VIVIDUS test site
run: curl https://vividus-test-site-a92k.onrender.com/ &
- name: Build
env:
MATRIX_PLATFORM: ${{ matrix.platform }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: bash
run: |
if [[ $MATRIX_PLATFORM = "ubuntu-latest" ]]; then
if [[ -n $SONAR_TOKEN ]]; then
./gradlew build sonar -Dsonar.host.url=https://sonarcloud.io \
-Dsonar.organization=vividus \
-Dsonar.projectKey=vividus-framework_vividus \
-Ptest.testLogging.exceptionFormat=full
else
echo No SONAR_TOKEN, SonarCloud analysis will be skipped
./gradlew build -Dorg.gradle.jvmargs="-Xmx2g -XX:MaxMetaspaceSize=768m" \
-Ptest.testLogging.exceptionFormat=full
fi
else
./gradlew build -x spotbugsMain -x spotbugsTest -x spotbugsIntegrationTest \
-x pmdMain -x pmdTest -x pmdIntegrationTest \
-Ptest.testLogging.exceptionFormat=full --no-daemon
fi
- name: Publish unit and integration tests reports
if: always()
uses: actions/upload-artifact@v4
with:
name: Unit and Integration Tests - Reports - ${{ matrix.platform }}
path: vividus/output/reports/tests
- name: Upload coverage to Codecov
if: ${{ !github.event.pull_request.head.repo.fork || github.ref == 'refs/heads/master'}}
uses: codecov/codecov-action@v5.1.1
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage to Codecov
if: ${{ github.event.pull_request.head.repo.fork }}
uses: codecov/codecov-action@v5.1.1
- name: VIVIDUS tasks validation
run: |
./gradlew validateKnownIssues printSteps countSteps -x testVividusInitialization -p vividus-tests --project-prop 'vividus.variables.iterationLimit=3' --project-prop 'vividus.variables.target-platform=ios'
- name: Integration tests
run: |
./gradlew :vividus-tests:debugStories --project-prop 'vividus.configuration-set.active=integration' --project-prop 'vividus.allure.history-directory=output/history/integration-tests' --project-prop 'vividus.allure.executor.name="Github Actions (Vividus)"' --project-prop 'vividus.allure.executor.type=github' --project-prop 'vividus.allure.executor.url=https://github.com/vividus-framework/vividus/actions' --project-prop 'vividus.allure.executor.build-order=${GITHUB_RUN_ID}' --project-prop 'vividus.allure.executor.build-name="Integration Tests ${GITHUB_RUN_ID}"' --project-prop 'vividus.allure.executor.build-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID}' --project-prop 'vividus.allure.executor.report-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID}' --project-prop 'vividus.allure.executor.report-name="Integration tests report"' --project-prop "fileToSaveExitCode=$(pwd)/exitCode.txt" --no-daemon
- name: Publish integration tests report
if: always()
uses: actions/upload-artifact@v4
with:
name: Integration Tests - Allure report - ${{ matrix.platform }}
path: vividus-tests/output/reports/allure
- name: Validate successful exit code
if: (matrix.platform == 'ubuntu-latest' || matrix.platform == 'windows-latest')
shell: bash
run: |
exitCode=$(cat ./exitCode.txt)
if [[ $exitCode -ne '1' ]]; then
exit $exitCode
fi
- name: Validate failed exit code
if: (matrix.platform == 'ubuntu-latest' || matrix.platform == 'windows-latest') && failure()
shell: bash
run: |
exitCode=$(cat ./exitCode.txt)
if [[ $exitCode -ne '2' ]]; then
echo Exit code is $exitCode
exit -1
fi
- name: Integration tests - Playwright
shell: bash
run: |
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments= \
-Pvividus.configuration.suites= \
-Pvividus.configuration.profiles=web_pw/headless/chromium \
-Pvividus.batch-1.meta-filters="groovy: playwrightSupported" \
-Pvividus.batch-1.resource-location=story/integration \
-Pvividus.batch-1.resource-include-patterns=*Steps*.story \
-Pvividus.web-application.main-page-url='${variables.vividus-test-site-url}'
- name: System tests
if: matrix.platform == 'ubuntu-latest'
env:
BROWSERSTACK_USER: ${{ secrets.BROWSERSTACK_USER }}
BROWSERSTACK_KEY: ${{ secrets.BROWSERSTACK_KEY }}
APPLITOOLS_EXECUTE_KEY: ${{ secrets.APPLITOOLS_EXECUTE_KEY }}
APPLITOOLS_READ_KEY: ${{ secrets.APPLITOOLS_READ_KEY }}
MONGODB_USERNAME: ${{ secrets.MONGODB_USERNAME }}
MONGODB_PASSWORD: ${{ secrets.MONGODB_PASSWORD }}
KAFKA_PASSWORD: ${{ secrets.KAFKA_PASSWORD }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_COSMOS_DB_KEY: ${{ secrets.AZURE_COSMOS_DB_KEY }}
GMAIL_PASSWORD: ${{ secrets.GMAIL_PASSWORD }}
shell: bash
run: |
if [[ -n $BROWSERSTACK_USER && -n $BROWSERSTACK_KEY && -n $APPLITOOLS_READ_KEY && -n $APPLITOOLS_READ_KEY && -n $MONGODB_USERNAME && -n $MONGODB_PASSWORD && -n $KAFKA_PASSWORD && -n $AWS_ACCESS_KEY_ID && -n $AWS_SECRET_ACCESS_KEY && -n $AWS_REGION && -n $AZURE_CLIENT_ID && -n $AZURE_CLIENT_SECRET && -n $AZURE_TENANT_ID && -n $AZURE_SUBSCRIPTION_ID && -n $AZURE_COSMOS_DB_KEY && -n $GMAIL_PASSWORD ]]; then
./gradlew :vividus-tests:debugStories -Pvividus.configuration-set.active=system \
-Pvividus.selenium.grid.username=${BROWSERSTACK_USER} \
-Pvividus.selenium.grid.password=${BROWSERSTACK_KEY} \
-Pvividus.selenium.grid.capabilities.bstack\:options.buildName="VIVIDUS System Tests" \
-Pvividus.allure.history-directory=output/history/system-tests \
-Pvividus.allure.executor.name="Github Actions (Vividus)" \
-Pvividus.allure.executor.type=github \
-Pvividus.allure.executor.url=https://github.com/vividus-framework/vividus/actions \
-Pvividus.allure.executor.build-order=${GITHUB_RUN_ID} \
-Pvividus.allure.executor.build-name="System Tests ${GITHUB_RUN_ID}" \
-Pvividus.allure.executor.build-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-name="System tests report" \
-Pvividus.azure.cosmos-db.account.vividus.key=${AZURE_COSMOS_DB_KEY} \
-Pvividus.notifications.base.comment="VIVIDUS CI - System tests" \
-Pvividus.notifications.base.report-link=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.notifications.base.project=vividus-tests \
-Pvividus.notifications.mail.host=smtp.gmail.com \
-Pvividus.notifications.mail.port=465 \
-Pvividus.notifications.mail.username=vividus.team@gmail.com \
-Pvividus.notifications.mail.password=${GMAIL_PASSWORD} \
-Pvividus.notifications.mail.from=vividus.team@gmail.com \
-Pvividus.notifications.mail.recipient="vividus.team@gmail.com, ivan@vividus.dev" \
-Pvividus.notifications.mail.security-protocol=SSL
else
echo No passwords/access keys are available, skipping system tests
fi
- name: Publish system tests report
if: matrix.platform == 'ubuntu-latest' && always()
uses: actions/upload-artifact@v4
with:
name: System Tests - Allure report
path: vividus-tests/output/reports/allure
- name: Headless - Web - System tests
if: matrix.platform == 'ubuntu-latest'
shell: bash
run: |
declare -a profiles=( firefox edge )
for profile in "${profiles[@]}"; do
./gradlew :vividus-tests:debugStories -Pvividus.configuration.suites=health_check \
-Pvividus.configuration.profiles=web/headless/${profile}
done
# New headless Chrome is used in CI, it will be made default in VIVIDUS 0.7.0 if testing passes (see more: https://developer.chrome.com/docs/chromium/new-headless)
./gradlew :vividus-tests:debugStories -Pvividus.configuration.suites=health_check \
-Pvividus.configuration.profiles=web/headless/chrome \
-Pvividus.web.driver.chrome.command-line-arguments="--headless=new --hide-scrollbars"
- name: LambdaTest - Desktop - Web - System tests
if: matrix.platform == 'macos-latest'
env:
LAMBDATEST_USER: ${{ secrets.LAMBDATEST_USER }}
LAMBDATEST_KEY: ${{ secrets.LAMBDATEST_KEY }}
shell: bash
run: |
if [[ -n $LAMBDATEST_USER && -n $LAMBDATEST_KEY ]]; then
declare -a profiles=( iexplore chrome firefox edge safari )
for profile in "${profiles[@]}"; do
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments= \
-Pvividus.configuration.suites=health_check \
-Pvividus.configuration.profiles=lambdatest/web,web/desktop/${profile} \
-Pvividus.selenium.grid.username=${LAMBDATEST_USER} \
-Pvividus.selenium.grid.password=${LAMBDATEST_KEY} \
-Pvividus.selenium.grid.capabilities.LT\:Options.build="VIVIDUS System Tests"
done
else
echo No LAMBDATEST_USER and/or LAMBDATEST_KEY, LambdaTest integration tests will be skipped
fi
- name: SauceLabs - Desktop - Web - System tests
if: matrix.platform == 'ubuntu-latest'
env:
SAUCELABS_USER: ${{ secrets.SAUCELABS_USER }}
SAUCELABS_KEY: ${{ secrets.SAUCELABS_KEY }}
shell: bash
run: |
if [[ -n $SAUCELABS_USER && -n $SAUCELABS_KEY ]]; then
declare -a profiles=( iexplore chrome firefox edge safari )
for profile in "${profiles[@]}"; do
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments=system/saucelabs \
-Pvividus.configuration.suites=health_check \
-Pvividus.configuration.profiles=saucelabs/web,web/desktop/${profile} \
-Pvividus.selenium.grid.username=${SAUCELABS_USER} \
-Pvividus.selenium.grid.password=${SAUCELABS_KEY}
done
else
echo No SAUCELABS_USER and/or SAUCELABS_KEY, SauceLabs system tests will be skipped
fi
- name: SauceLabs - Desktop - Chrome DevTools
if: matrix.platform == 'ubuntu-latest'
env:
SAUCELABS_USER: ${{ secrets.SAUCELABS_USER }}
SAUCELABS_KEY: ${{ secrets.SAUCELABS_KEY }}
shell: bash
run: |
if [[ -n $SAUCELABS_USER && -n $SAUCELABS_KEY ]]; then
declare -a configs=( 'Windows 11:1920x1080' 'macOS 13:1920x1440' )
for config in "${configs[@]}"; do
platform=${config%%:*}
resolution=${config##*:}
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments=system/saucelabs \
-Pvividus.configuration.suites=cdp \
-Pvividus.configuration.profiles=saucelabs/web,web/desktop/chrome \
-Pvividus.selenium.grid.username=${SAUCELABS_USER} \
-Pvividus.selenium.grid.password=${SAUCELABS_KEY} \
-Pvividus.selenium.grid.capabilities.platformName="${platform}" \
-Pvividus.selenium.grid.screen-resolution="${resolution}"
done
else
echo No SAUCELABS_USER and/or SAUCELABS_KEY, SauceLabs system tests will be skipped
fi
- name: SauceLabs - Desktop - Web + Proxy + SauceConnect - System tests
if: (matrix.platform == 'ubuntu-latest' || matrix.platform == 'windows-latest')
env:
SAUCELABS_USER: ${{ secrets.SAUCELABS_USER }}
SAUCELABS_KEY: ${{ secrets.SAUCELABS_KEY }}
shell: bash
run: |
if [[ -n $SAUCELABS_USER && -n $SAUCELABS_KEY ]]; then
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments=system/saucelabs \
-Pvividus.configuration.suites= \
-Pvividus.configuration.profiles=saucelabs/web,web/desktop/chrome \
-Pvividus.batch-1.resource-location=story/integration \
-Pvividus.batch-1.resource-include-patterns=ProxyStepsTests.story \
-Pvividus.selenium.grid.username=${SAUCELABS_USER} \
-Pvividus.selenium.grid.password=${SAUCELABS_KEY} \
-Pvividus.saucelabs.sauce-connect.command-line-arguments="--proxy-localhost --no-ssl-bump-domains example.com"
else
echo No SAUCELABS_USER and/or SAUCELABS_KEY, SauceLabs system tests will be skipped
fi
- name: SauceLabs - Tablet - Web - System tests
if: matrix.platform == 'ubuntu-latest'
env:
SAUCELABS_USER: ${{ secrets.SAUCELABS_USER }}
SAUCELABS_KEY: ${{ secrets.SAUCELABS_KEY }}
shell: bash
run: |
if [[ -n $SAUCELABS_USER && -n $SAUCELABS_KEY ]]; then
declare -a profiles=( ipad )
for profile in "${profiles[@]}"; do
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments=system/saucelabs/${profile} \
-Pvividus.configuration.suites=system/${profile} \
-Pvividus.configuration.profiles=saucelabs/web,web/tablet/${profile} \
-Pvividus.selenium.grid.username=${SAUCELABS_USER} \
-Pvividus.selenium.grid.password=${SAUCELABS_KEY}
done
else
echo No SAUCELABS_USER and/or SAUCELABS_KEY, SauceLabs system tests will be skipped
fi
- name: SauceLabs - Mobile - Web - System tests
if: matrix.platform == 'ubuntu-latest'
env:
SAUCELABS_USER: ${{ secrets.SAUCELABS_USER }}
SAUCELABS_KEY: ${{ secrets.SAUCELABS_KEY }}
shell: bash
run: |
if [[ -n $SAUCELABS_USER && -n $SAUCELABS_KEY ]]; then
declare -a profiles=( iphone android )
for profile in "${profiles[@]}"; do
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments=system/saucelabs \
-Pvividus.configuration.suites=health_check \
-Pvividus.configuration.profiles=saucelabs/web/phone/${profile},web/phone/${profile} \
-Pvividus.selenium.grid.username=${SAUCELABS_USER} \
-Pvividus.selenium.grid.password=${SAUCELABS_KEY}
done
else
echo No SAUCELABS_USER and/or SAUCELABS_KEY, SauceLabs system tests will be skipped
fi
- name: BrowserStack - Mobile - Web - System tests
if: matrix.platform == 'macos-latest'
env:
BROWSERSTACK_USER: ${{ secrets.BROWSERSTACK_USER }}
BROWSERSTACK_KEY: ${{ secrets.BROWSERSTACK_KEY }}
shell: bash
run: |
if [[ -n $BROWSERSTACK_USER && -n $BROWSERSTACK_KEY ]]; then
declare -a profiles=( iphone android )
for profile in "${profiles[@]}"; do
./gradlew :vividus-tests:debugStories -Pvividus.configuration.suites=health_check \
-Pvividus.configuration.profiles=browserstack/web/phone/${profile},web/phone/${profile} \
-Pvividus.selenium.grid.username=${BROWSERSTACK_USER} \
-Pvividus.selenium.grid.password=${BROWSERSTACK_KEY}
done
else
echo No BROWSERSTACK_USER and/or BROWSERSTACK_KEY, Browserstack phone system tests will be skipped
fi
- name: Mobitru - Mobile - Web - System tests
if: matrix.platform == 'macos-latest'
env:
MOBITRU_USER: ${{ secrets.MOBITRU_USER }}
MOBITRU_KEY: ${{ secrets.MOBITRU_KEY }}
shell: bash
run: |
if [[ -n $MOBITRU_USER && -n $MOBITRU_KEY ]]; then
./gradlew :vividus-tests:debugStories -Pvividus.configuration.suites=health_check \
-Pvividus.configuration.profiles=mobitru/web,web/phone/iphone \
-Pvividus.selenium.grid.capabilities.appium\:platformVersion=18 \
-Pvividus.selenium.grid.username=${MOBITRU_USER} \
-Pvividus.selenium.grid.password=${MOBITRU_KEY}
./gradlew :vividus-tests:debugStories -Pvividus.configuration.suites=health_check \
-Pvividus.configuration.profiles=mobitru/web,web/phone/android \
-Pvividus.selenium.grid.capabilities.appium\:platformVersion=14 \
-Pvividus.selenium.grid.username=${MOBITRU_USER} \
-Pvividus.selenium.grid.password=${MOBITRU_KEY}
else
echo No MOBITRU_USER and/or MOBITRU_KEY, Mobitru web mobile system tests will be skipped
fi
- name: SauceLabs - iOS - Mobile App - Run system tests
if: matrix.platform == 'ubuntu-latest'
env:
SAUCELABS_USER: ${{ secrets.SAUCELABS_USER }}
SAUCELABS_KEY: ${{ secrets.SAUCELABS_KEY }}
shell: bash
run: |
if [[ -n $SAUCELABS_USER && -n $SAUCELABS_KEY ]]; then
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments=system/saucelabs/mobile_app/ios \
-Pvividus.configuration.suites=system/mobile_app/ios,ui \
-Pvividus.configuration.profiles=saucelabs/mobile_app,mobile_app/ios \
-Pvividus.selenium.grid.username=${SAUCELABS_USER} \
-Pvividus.selenium.grid.password=${SAUCELABS_KEY} \
-Pvividus.allure.history-directory=output/history/sl-ios-system-tests \
-Pvividus.allure.report-directory=output/reports/sl-ios-allure \
-Pvividus.allure.executor.name="Github Actions (Vividus)" \
-Pvividus.allure.executor.type=github \
-Pvividus.allure.executor.url=https://github.com/vividus-framework/vividus/actions \
-Pvividus.allure.executor.build-order=${GITHUB_RUN_ID} \
-Pvividus.allure.executor.build-name="SauceLabs iOS System Tests ${GITHUB_RUN_ID}" \
-Pvividus.allure.executor.build-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-name="SauceLabs iOS System tests report" \
-Pvividus.variables.app-url=storage:filename=vividus-test-app-ios-$TEST_APP_VERSION.zip \
-Pvividus.statistics.print-failures=true \
-Pvividus.ui.context.self-healing=true
else
echo No SAUCELABS_USER and/or SAUCELABS_KEY variables, System tests will be skipped
fi
- name: SauceLabs - iOS - Mobile App - Publish system tests report
if: matrix.platform == 'ubuntu-latest' && always()
uses: actions/upload-artifact@v4
with:
name: SauceLabs - System Tests - Allure report - iOS
path: vividus-tests/output/reports/sl-ios-allure
- name: SauceLabs - iOS Proxy - Mobile App - Run system tests
if: matrix.platform == 'ubuntu-latest'
env:
SAUCELABS_USER: ${{ secrets.SAUCELABS_USER }}
SAUCELABS_KEY: ${{ secrets.SAUCELABS_KEY }}
shell: bash
run: |
if [[ -n $SAUCELABS_USER && -n $SAUCELABS_KEY ]]; then
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments=system/saucelabs/mobile_app/ios \
-Pvividus.configuration.suites= \
-Pvividus.configuration.profiles=saucelabs/mobile_app,mobile_app/ios \
-Pvividus.batch-1.resource-location=story/system/mobile_app \
-Pvividus.batch-1.resource-include-patterns=ProxyMobileStepsTests.story \
-Pvividus.selenium.grid.username=${SAUCELABS_USER} \
-Pvividus.selenium.grid.password=${SAUCELABS_KEY} \
-Pvividus.allure.history-directory=output/history/sl-ios-proxy-system-tests \
-Pvividus.allure.report-directory=output/reports/sl-ios-proxy-allure \
-Pvividus.allure.executor.name="Github Actions (Vividus)" \
-Pvividus.allure.executor.type=github \
-Pvividus.allure.executor.url=https://github.com/vividus-framework/vividus/actions \
-Pvividus.allure.executor.build-order=${GITHUB_RUN_ID} \
-Pvividus.allure.executor.build-name="SauceLabs iOS Proxy Tests ${GITHUB_RUN_ID}" \
-Pvividus.allure.executor.build-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-name="SauceLabs iOS Proxy tests report" \
-Pvividus.saucelabs.sauce-connect.command-line-arguments="--proxy-localhost --no-ssl-bump-domains example.com" \
-Pvividus.variables.app-url=storage:filename=vividus-test-app-ios-$TEST_APP_VERSION.zip
else
echo No SAUCELABS_USER and/or SAUCELABS_KEY variables, System tests will be skipped
fi
- name: SauceLabs - iOS Proxy - Mobile App - Publish system tests report
if: matrix.platform == 'ubuntu-latest' && always()
uses: actions/upload-artifact@v4
with:
name: SauceLabs - System Tests With Proxy- Allure report - iOS
path: vividus-tests/output/reports/sl-ios-proxy-allure
- name: SauceLabs - Android - Mobile App - Run system tests
if: matrix.platform == 'ubuntu-latest'
env:
SAUCELABS_USER: ${{ secrets.SAUCELABS_USER }}
SAUCELABS_KEY: ${{ secrets.SAUCELABS_KEY }}
shell: bash
run: |
if [[ -n $SAUCELABS_USER && -n $SAUCELABS_KEY ]]; then
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments=system/saucelabs/mobile_app/android \
-Pvividus.configuration.suites=system/mobile_app/android \
-Pvividus.configuration.profiles=saucelabs/mobile_app,mobile_app/android \
-Pvividus.selenium.grid.username=${SAUCELABS_USER} \
-Pvividus.selenium.grid.password=${SAUCELABS_KEY} \
-Pvividus.allure.history-directory=output/history/sl-android-system-tests \
-Pvividus.allure.report-directory=output/reports/sl-android-allure \
-Pvividus.allure.executor.name="Github Actions (Vividus)" \
-Pvividus.allure.executor.type=github \
-Pvividus.allure.executor.url=https://github.com/vividus-framework/vividus/actions \
-Pvividus.allure.executor.build-order=${GITHUB_RUN_ID} \
-Pvividus.allure.executor.build-name="SauceLabs Android System Tests ${GITHUB_RUN_ID}" \
-Pvividus.allure.executor.build-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-name="SauceLabs Android System tests report" \
-Pvividus.variables.app-url=storage:filename=vividus-test-app-android-$TEST_APP_VERSION.zip \
-Pvividus.statistics.print-failures=true \
-Pvividus.batch-1.resource-include-patterns=VisualTesting.story
else
echo No SAUCELABS_USER and/or SAUCELABS_KEY variables, System tests will be skipped
fi
- name: SauceLabs - Android - Mobile App - Publish system tests report
if: matrix.platform == 'ubuntu-latest' && always()
uses: actions/upload-artifact@v4
with:
name: SauceLabs - System Tests - Allure report - Android
path: vividus-tests/output/reports/sl-android-allure
- name: SauceLabs - Android Proxy- Mobile App - Run system tests
if: matrix.platform == 'ubuntu-latest'
env:
SAUCELABS_USER: ${{ secrets.SAUCELABS_USER }}
SAUCELABS_KEY: ${{ secrets.SAUCELABS_KEY }}
shell: bash
run: |
if [[ -n $SAUCELABS_USER && -n $SAUCELABS_KEY ]]; then
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments=system/saucelabs/mobile_app/android \
-Pvividus.configuration.suites= \
-Pvividus.configuration.profiles=saucelabs/mobile_app,mobile_app/android \
-Pvividus.batch-1.resource-location=story/system/mobile_app \
-Pvividus.batch-1.resource-include-patterns=ProxyMobileStepsTests.story \
-Pvividus.selenium.grid.username=${SAUCELABS_USER} \
-Pvividus.selenium.grid.password=${SAUCELABS_KEY} \
-Pvividus.allure.history-directory=output/history/sl-android-proxy-system-tests \
-Pvividus.allure.report-directory=output/reports/sl-android-proxy-allure \
-Pvividus.allure.executor.name="Github Actions (Vividus)" \
-Pvividus.allure.executor.type=github \
-Pvividus.allure.executor.url=https://github.com/vividus-framework/vividus/actions \
-Pvividus.allure.executor.build-order=${GITHUB_RUN_ID} \
-Pvividus.allure.executor.build-name="SauceLabs Android Proxy Tests ${GITHUB_RUN_ID}" \
-Pvividus.allure.executor.build-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-name="SauceLabs Android Proxy tests report" \
-Pvividus.saucelabs.sauce-connect.command-line-arguments="--proxy-localhost --no-ssl-bump-domains example.com" \
-Pvividus.variables.app-url=storage:filename=vividus-test-app-android-$TEST_APP_VERSION.zip
else
echo No SAUCELABS_USER and/or SAUCELABS_KEY variables, System tests will be skipped
fi
- name: SauceLabs - Android Proxy - Mobile App - Publish system tests report
if: matrix.platform == 'ubuntu-latest' && always()
uses: actions/upload-artifact@v4
with:
name: SauceLabs - System Tests With Proxy- Allure report - Android
path: vividus-tests/output/reports/sl-android-proxy-allure
- name: BrowserStack - Desktop - Web - System tests
if: matrix.platform == 'macos-latest'
env:
BROWSERSTACK_USER: ${{ secrets.BROWSERSTACK_USER }}
BROWSERSTACK_KEY: ${{ secrets.BROWSERSTACK_KEY }}
shell: bash
run: |
if [[ -n $BROWSERSTACK_USER && -n $BROWSERSTACK_KEY ]]; then
declare -a profiles=( iexplore chrome firefox edge safari )
for profile in "${profiles[@]}"; do
./gradlew :vividus-tests:debugStories -Pvividus.configuration.suites=health_check \
-Pvividus.configuration.profiles=browserstack/web,web/desktop/${profile} \
-Pvividus.selenium.grid.username=${BROWSERSTACK_USER} \
-Pvividus.selenium.grid.password=${BROWSERSTACK_KEY} \
-Pvividus.selenium.grid.capabilities.bstack\:options.buildName="VIVIDUS BrowserStack Integration Tests"
done
else
echo No BROWSERSTACK_USER and/or BROWSERSTACK_KEY, Browserstack integration tests will be skipped
fi
- name: BrowserStack - iOS - Mobile App - Run system tests
if: matrix.platform == 'macos-latest'
env:
BROWSERSTACK_USER: ${{ secrets.BROWSERSTACK_USER }}
BROWSERSTACK_KEY: ${{ secrets.BROWSERSTACK_KEY }}
GMAIL_PASSWORD: ${{ secrets.GMAIL_PASSWORD }}
shell: bash
run: |
if [[ -n $BROWSERSTACK_USER && -n $BROWSERSTACK_KEY ]]; then
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments= \
-Pvividus.configuration.suites=system/mobile_app/healthcheck/browserstack \
-Pvividus.configuration.profiles=browserstack/mobile_app/ios,mobile_app/ios \
-Pvividus.selenium.grid.username=${BROWSERSTACK_USER} \
-Pvividus.selenium.grid.password=${BROWSERSTACK_KEY} \
-Pvividus.selenium.grid.capabilities.bstack\:options.buildName="VIVIDUS iOS System Tests" \
-Pvividus.allure.history-directory=output/history/bs-ios-system-tests \
-Pvividus.allure.report-directory=output/reports/bs-ios-allure \
-Pvividus.allure.executor.name="Github Actions (Vividus)" \
-Pvividus.allure.executor.type=github \
-Pvividus.allure.executor.url=https://github.com/vividus-framework/vividus/actions \
-Pvividus.allure.executor.build-order=${GITHUB_RUN_ID} \
-Pvividus.allure.executor.build-name="BrowserStack iOS System Tests ${GITHUB_RUN_ID}" \
-Pvividus.allure.executor.build-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-name="BrowserStack iOS System tests report" \
-Pvividus.variables.app-url=bs://0a9c4e8ad122abb9951dc5cf4f735eecbd4b1264 \
-Pvividus.notifications.base.comment="VIVIDUS CI - BrowserStack iOS System Tests" \
-Pvividus.notifications.base.report-link=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.notifications.base.project=vividus-tests \
-Pvividus.notifications.mail.host=smtp.gmail.com \
-Pvividus.notifications.mail.port=587 \
-Pvividus.notifications.mail.username=vividus.team@gmail.com \
-Pvividus.notifications.mail.password=${GMAIL_PASSWORD} \
-Pvividus.notifications.mail.from=vividus.team@gmail.com \
-Pvividus.notifications.mail.recipient="vividus.team@gmail.com, ivan@vividus.dev" \
-Pvividus.notifications.mail.security-protocol=STARTTLS
else
echo No BROWSERSTACK_USER and/or BROWSERSTACK_KEY variables, System tests will be skipped
fi
- name: BrowserStack - iOS - Mobile App - Publish system tests report
if: matrix.platform == 'macos-latest' && always()
uses: actions/upload-artifact@v4
with:
name: BrowserStack - System Tests - Allure report - iOS
path: vividus-tests/output/reports/bs-ios-allure
- name: BrowserStack - Android - Mobile App - Run system tests
if: matrix.platform == 'macos-latest'
env:
BROWSERSTACK_USER: ${{ secrets.BROWSERSTACK_USER }}
BROWSERSTACK_KEY: ${{ secrets.BROWSERSTACK_KEY }}
shell: bash
run: |
if [[ -n $BROWSERSTACK_USER && -n $BROWSERSTACK_KEY ]]; then
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments= \
-Pvividus.configuration.suites=system/mobile_app/healthcheck/browserstack \
-Pvividus.configuration.profiles=browserstack/mobile_app/android,mobile_app/android \
-Pvividus.selenium.grid.username=${BROWSERSTACK_USER} \
-Pvividus.selenium.grid.password=${BROWSERSTACK_KEY} \
-Pvividus.selenium.grid.capabilities.bstack\:options.buildName="VIVIDUS Android System Tests" \
-Pvividus.allure.history-directory=output/history/bs-android-system-tests \
-Pvividus.allure.report-directory=output/reports/bs-android-allure \
-Pvividus.allure.executor.name="Github Actions (Vividus)" \
-Pvividus.allure.executor.type=github \
-Pvividus.allure.executor.url=https://github.com/vividus-framework/vividus/actions \
-Pvividus.allure.executor.build-order=${GITHUB_RUN_ID} \
-Pvividus.allure.executor.build-name="BrowserStack Android System Tests ${GITHUB_RUN_ID}" \
-Pvividus.allure.executor.build-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-name="BrowserStack Android System tests report" \
-Pvividus.variables.app-url=bs://19d5ef3173e4b49b785b759ae0abfac52bfb69f5
else
echo No BROWSERSTACK_USER and/or BROWSERSTACK_KEY variables, System tests will be skipped
fi
- name: BrowserStack - Android - Mobile App - Publish system tests report
if: matrix.platform == 'macos-latest' && always()
uses: actions/upload-artifact@v4
with:
name: BrowserStack - System Tests - Allure report - Android
path: vividus-tests/output/reports/bs-android-allure
- name: Mobitru - Android - Mobile App - Run system tests
if: matrix.platform == 'macos-latest'
env:
MOBITRU_USER: ${{ secrets.MOBITRU_USER }}
MOBITRU_KEY: ${{ secrets.MOBITRU_KEY }}
shell: bash
run: |
if [[ -n $MOBITRU_USER && -n $MOBITRU_KEY ]]; then
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments= \
-Pvividus.configuration.suites=system/mobile_app/healthcheck/mobitru,system/mobile_app/android \
-Pvividus.configuration.profiles=mobitru/mobile_app,mobile_app/android \
-Pvividus.selenium.grid.username=${MOBITRU_USER} \
-Pvividus.selenium.grid.password=${MOBITRU_KEY} \
-Pvividus.selenium.grid.capabilities.platformVersion=13 \
-Pvividus.allure.history-directory=output/history/mt-android-system-tests \
-Pvividus.allure.report-directory=output/reports/mt-android-allure \
-Pvividus.allure.executor.name="Github Actions (Vividus)" \
-Pvividus.allure.executor.type=github \
-Pvividus.allure.executor.url=https://github.com/vividus-framework/vividus/actions \
-Pvividus.allure.executor.build-order=${GITHUB_RUN_ID} \
-Pvividus.allure.executor.build-name="Mobitru Android System Tests ${GITHUB_RUN_ID}" \
-Pvividus.allure.executor.build-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-name="Mobitru Android System tests report" \
-Pvividus.mobitru.app-file-name=Android.Sample.app.2.7.1.apk \
-Pvividus.mobile-application.bundle-id=com.swaglabsmobileapp
else
echo No MOBITRU_USER and/or MOBITRU_KEY variables, System tests will be skipped
fi
- name: Mobitru - Android - Mobile App - Publish system tests report
if: matrix.platform == 'macos-latest' && always()
uses: actions/upload-artifact@v4
with:
name: Mobitru - System Tests - Allure report - Android
path: vividus-tests/output/reports/mt-android-allure
- name: Mobitru - IOS - Mobile App - Run system tests
if: matrix.platform == 'macos-latest'
env:
MOBITRU_USER: ${{ secrets.MOBITRU_USER }}
MOBITRU_KEY: ${{ secrets.MOBITRU_KEY }}
shell: bash
run: |
if [[ -n $MOBITRU_USER && -n $MOBITRU_KEY ]]; then
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments= \
-Pvividus.configuration.suites=system/mobile_app/healthcheck/mobitru,system/mobile_app/ios \
-Pvividus.configuration.profiles=mobitru/mobile_app,mobile_app/ios \
-Pvividus.selenium.grid.username=${MOBITRU_USER} \
-Pvividus.selenium.grid.password=${MOBITRU_KEY} \
-Pvividus.allure.history-directory=output/history/mt-ios-system-tests \
-Pvividus.allure.report-directory=output/reports/mt-ios-allure \
-Pvividus.allure.executor.name="Github Actions (Vividus)" \
-Pvividus.allure.executor.type=github \
-Pvividus.allure.executor.url=https://github.com/vividus-framework/vividus/actions \
-Pvividus.allure.executor.build-order=${GITHUB_RUN_ID} \
-Pvividus.allure.executor.build-name="Mobitru iOS System Tests ${GITHUB_RUN_ID}" \
-Pvividus.allure.executor.build-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-name="Mobitru iOS System tests report" \
-Pvividus.mobitru.app-file-name=iOS.Sample.app.2.7.1.ipa \
-Pvividus.mobile-application.bundle-id=com.saucelabs.SwagLabsMobileApp
else
echo No MOBITRU_USER and/or MOBITRU_KEY variables, System tests will be skipped
fi
- name: Mobitru - iOS - Mobile App - Publish system tests report
if: matrix.platform == 'macos-latest' && always()
uses: actions/upload-artifact@v4
with:
name: Mobitru - System Tests - Allure report - iOS
path: vividus-tests/output/reports/mt-ios-allure
- name: Validate fail fast
if: matrix.platform == 'macos-latest'
shell: bash
run: |
./gradlew :vividus-tests:validateRunStatistics \
-Pvividus.configuration.suites=failFast \
-PexpectedRunStatistics="resources/main/failFast/expected.json" \
-Pvividus.story.fail-fast=true \
-Pvividus.scenario.fail-fast=true \
-Pvividus.batch.fail-fast=true
- name: Validate fail fast configured at batch level
if: matrix.platform == 'macos-latest'
shell: bash
run: |
./gradlew :vividus-tests:validateRunStatistics \
-Pvividus.configuration.suites=failFast \
-PexpectedRunStatistics="resources/main/failFast/expected.json" \
-Pvividus.batch-1.story.fail-fast=true \
-Pvividus.batch-1.scenario.fail-fast=true \
-Pvividus.batch.fail-fast=true
- name: Validate fail fast batch override
if: matrix.platform == 'macos-latest'
shell: bash
run: |
./gradlew :vividus-tests:validateRunStatistics \
-Pvividus.configuration.suites=failFast \
-PexpectedRunStatistics="resources/main/failFast/expected-batch.json" \
-Pvividus.story.fail-fast=true \
-Pvividus.scenario.fail-fast=true \
-Pvividus.batch-1.story.fail-fast=false \
-Pvividus.batch-1.scenario.fail-fast=false \
-Pvividus.batch.fail-fast=true
- name: Replace and validate deprecated steps
if: matrix.platform == 'macos-latest'
shell: bash
run: |
./gradlew :vividus-tests:replaceDeprecatedSteps
actualStory="vividus-tests/src/main/resources/story/replacement/ReplacedStepsActual.story"
expectedStory="vividus-tests/src/main/resources/story/replacement/ReplacedStepsExpected.story"
actualComposites="vividus-tests/src/main/resources/steps/replacement/replaced_composites_actual.steps"
expectedComposites="vividus-tests/src/main/resources/steps/replacement/replaced_composites_expected.steps"
cmp "$actualStory" "$expectedStory"
cmp "$actualComposites" "$expectedComposites"
- name: Replace and validate deprecated properties
if: matrix.platform == 'macos-latest'
shell: bash
run: |
./gradlew :vividus-tests:replaceDeprecatedProperties
actualProperties="vividus-tests/src/main/resources/properties/environment/system/properties_replacer/actual_properties.properties"
expectedProperties="vividus-tests/src/main/resources/properties/environment/system/properties_replacer/expected_properties.properties"
cmp "$actualProperties" "$expectedProperties"
- name: Publish artifacts to GitHub packages
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/release-')) && matrix.platform == 'ubuntu-latest'
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/release-')) && matrix.platform == 'ubuntu-latest'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image to Docker Hub
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/release-')) && matrix.platform == 'ubuntu-latest'
run: ./gradlew :vividus-docker-bundler:pushImage