This repository has been archived by the owner on Sep 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.yml
1942 lines (1764 loc) · 55.2 KB
/
config.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
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
version: 2
# Variables
load_hatch_rate: &load_hatch_rate
HATCH_RATE: 3
load_num_users: &load_num_users
NUM_USERS: 1000
load_run_time: &load_run_time
RUN_TIME: 5m
# Machines configs
machine_python3_clean: &machine_python3_clean
docker:
- image: circleci/python:3.8.0
machine_python3_node: &machine_python3_node
docker:
- image: circleci/python:3.8.0-node
machine_python3_node_browsers: &machine_python3_node_browsers
docker:
- image: circleci/python:3.8.0-node-browsers
# Individual (shared) steps.
step_checkout_repo: &step_checkout_repo
checkout
step_install_requirements_for_smoke_tests: &step_install_requirements_for_smoke_tests
run:
name: Create virtualenv and install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install --quiet --upgrade pip
pip install --quiet -r requirements_smoke.txt
step_install_requirements_for_functional_tests: &step_install_requirements_for_functional_tests
run:
name: Create virtualenv and install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install --quiet --upgrade pip
pip install --quiet -r requirements_functional.txt
sudo npm install -g junit-merge@2.0.0
step_install_requirements_for_parallel_browser_tests: &step_install_requirements_for_parallel_browser_tests
run:
name: Create virtualenv and install dependencies
when: always
command: |
python3 -m venv venv
. venv/bin/activate
pip install --quiet --upgrade pip
pip install --quiet -r requirements_browser.txt
step_install_requirements_for_periodic_tasks: &step_install_requirements_for_periodic_tasks
run:
name: Create virtualenv and install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install -q -r requirements_periodic_tasks.txt
step_install_allure_cli: &step_install_allure_cli
run:
name: Install Allure command line tool
when: always
command: |
wget https://github.com/allure-framework/allure2/releases/download/2.13.1/allure-commandline-2.13.1.zip -O allure.zip
unzip -q allure.zip
find . -maxdepth 1 -type d -name "allure*" -exec mv {} allure \;
step_install_moxci: &step_install_moxci
run:
name: Install moxci to send CircleCI notifacations to Slack
when: always
command: |
sudo npm install -g moxci@0.1.3
step_save_test_related_env_vars: &step_save_test_related_env_vars
run:
name: Saving environment variables that control test execution
when: always
command: |
. venv/bin/activate
echo "Saving environment variables that control test execution"
./save_test_related_env_vars.py
step_make_allure_report: &step_make_allure_report
run:
name: Generate Allure report
when: always
command: |
export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which javac))))
export PATH=$PATH:$HOME/bin:$PATH:$JAVA_HOME/bin:./allure/bin
make report
step_update_allure_result_files_generated_by_browser_tests: &step_update_allure_result_files_generated_by_browser_tests
run:
name: Update Allure result files generated by Browser tests
when: always
command: |
set -e
mv tests/browser/results* .
ls -lad results*
make results_browser
step_update_allure_result_files_generated_by_functional_tests: &step_update_allure_result_files_generated_by_functional_tests
run:
name: Update Allure result files generated by Functional tests
when: always
command: |
set -e
ls -lad results*
make results_functional
step_install_junit_merge: &step_install_junit_merge
run:
name: Install an npm package to merge JUnit XML report files
when: always
command: |
sudo npm install -g junit-merge@2.0.0
step_prepare_list_of_scenarios_to_run_by_parallel_browser_tests: &step_prepare_list_of_scenarios_to_run_by_parallel_browser_tests
run:
name: Prepare a list of scenarios to run
command: |
. venv/bin/activate
python ./env_vars/env_writer.py --env=${TEST_ENV} --config=./env_vars/env.json
source ./env_vars/.env_with_export
export PATH=$PATH:$HOME/bin
if [ $(( ${CIRCLE_NODE_INDEX} % 2 )) = 0 ];
then
export BROWSER="chrome";
else
export BROWSER="firefox";
fi
cd tests/browser
PYTHONPATH=. behave \
--dry-run \
--no-source \
--no-summary \
--no-snippets \
--no-skipped \
--tags=~@wip \
--tags=~@fixme \
--tags=~@skip \
--tags=~@eu-exit \
${TAGS} \
--format=mini \
features/ \
| grep -v "Supplied path\|Trying base directory" > scenario_titles.txt
step_install_requirements_for_load_tests: &step_install_requirements_for_load_tests
run:
name: Create virtualenv and install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install --quiet --upgrade pip
pip install --quiet -r requirements_load.txt
step_cache_smoke_tests_requirements: &step_cache_smoke_tests_requirements
save_cache:
key: smoke-tests-dependency-cache-{{ .Revision }}
paths:
- ~/directory-tests
step_cache_functional_tests_requirements: &step_cache_functional_tests_requirements
save_cache:
key: functional-tests-dependency-cache-{{ .Environment.CIRCLE_WORKFLOW_ID }}
paths:
- ~/directory-tests
step_cache_browser_tests_requirements: &step_cache_browser_tests_requirements
save_cache:
key: browser-tests-dependency-cache-{{ .Environment.CIRCLE_WORKFLOW_ID }}
paths:
- ~/directory-tests
step_cache_load_tests_requirements: &step_cache_load_tests_requirements
save_cache:
key: load-tests-dependency-cache-{{ .Environment.CIRCLE_WORKFLOW_ID }}
paths:
- ~/directory-tests
step_cache_periodic_tasks_requirements: &step_cache_periodic_tasks_requirements
save_cache:
key: periodic-tasks-dependency-cache-{{ .Revision }}
paths:
- ~/directory-tests
step_restore_cached_smoke_tests_requirements: &step_restore_cached_smoke_tests_requirements
restore_cache:
keys:
- smoke-tests-dependency-cache-{{ .Revision }}
step_restore_cached_browser_tests_requirements: &step_restore_cached_browser_tests_requirements
restore_cache:
keys:
- browser-tests-dependency-cache-{{ .Environment.CIRCLE_WORKFLOW_ID }}
step_restore_cached_functional_tests_requirements: &step_restore_cached_functional_tests_requirements
restore_cache:
keys:
- functional-tests-dependency-cache-{{ .Environment.CIRCLE_WORKFLOW_ID }}
step_restore_cached_load_tests_requirements: &step_restore_cached_load_tests_requirements
restore_cache:
keys:
- load-tests-dependency-cache-{{ .Environment.CIRCLE_WORKFLOW_ID }}
step_restore_cached_periodic_tasks_requirements: &step_restore_cached_periodic_tasks_requirements
restore_cache:
key: periodic-tasks-dependency-cache-{{ .Revision }}
step_run_smoke_tests: &step_run_smoke_tests
run:
name: Run smoke tests
command: |
. venv/bin/activate
python ./env_vars/env_writer.py --env=${TEST_ENV} --config=./env_vars/env.json
source ./env_vars/.env_with_export
PYTEST_ARGS=${PYTEST_ARGS} make smoke_tests
step_run_functional_tests: &step_run_functional_tests
run:
name: Run functional tests
command: |
python3 -m venv venv
. venv/bin/activate
python ./env_vars/env_writer.py --env=${TEST_ENV} --config=./env_vars/env.json
source ./env_vars/.env_with_export;
export PATH=$PATH:$HOME/bin
FEATURE_DIR=${FEATURE_DIR} TAGS="${TAGS}" make functional_tests_feature_dir
step_delete_test_data: &step_delete_test_data
run:
name: Delete form submissions, SSO accounts & companies created by automated tests
when: always
command: |
. venv/bin/activate
python ./env_vars/env_writer.py --env=${TEST_ENV} --config=./env_vars/env.json
source ./env_vars/.env_with_export;
export PATH=$PATH:$HOME/bin
./delete_test_data.py
step_run_browser_tests_in_parallel: &step_run_browser_tests_in_parallel
run:
name: Run browser tests in parallel
command: |
. venv/bin/activate
source ./env_vars/.env_with_export
export PATH=$PATH:$HOME/bin
if [ $(( ${CIRCLE_NODE_INDEX} % 2 )) = 0 ];
then
export BROWSER="chrome";
google-chrome --version;
else
export BROWSER="firefox";
firefox --version;
export TAGS="${TAGS} --tags=~@skip-in-firefox"
fi
cd tests/browser
echo "Found `wc -l < scenario_titles.txt` scenarios to run"
# cat scenario_titles.txt | circleci tests split > /tmp/tests-to-run
# calculate number of lines after which list of scenarios will be split
SPLIT_AFTER_LINES=$(( $(wc -l < scenario_titles.txt) / $((${CIRCLE_NODE_TOTAL} / 2)) ))
# split list of scenarios into equal parts (equal to half on number of nodes)
# as half of nodes run tests in Chrome & the other half in Firefox
split -d --suffix-length=1 --lines ${SPLIT_AFTER_LINES} scenario_titles.txt tests-to-run
SPLIT_FILE_SUFFIX=$(( ${CIRCLE_NODE_INDEX} / 2 ))
echo "Current instance of ${BROWSER} is going to run `cat tests-to-run${SPLIT_FILE_SUFFIX} | wc -l` scenarios:"
cat tests-to-run${SPLIT_FILE_SUFFIX}
cat tests-to-run${SPLIT_FILE_SUFFIX} | while IFS=$'\r' read -r title ; do
echo -e "\n\n${BROWSER} run: ${title}"
PYTHONPATH=. \
LOG_FILE="reports/behave_${BROWSER}_${CIRCLE_NODE_INDEX}.log" \
timeout --verbose --preserve-status --kill-after=5s 5m \
behave features/ \
--format=allure_behave.formatter:AllureFormatter \
--define AllureFormatter.issue_pattern=${BUG_TRACKER_URL_PATTERN} \
--define AllureFormatter.link_pattern=${BUG_TRACKER_URL_PATTERN} \
--outfile=results_${BROWSER}_${CIRCLE_NODE_INDEX}/ \
--no-skipped \
--no-source \
--no-summary \
--junit \
--junit-directory=./junit_reports_${BROWSER}_${CIRCLE_NODE_INDEX}/ \
--tags=~@wip \
--tags=~@fixme \
--tags=~@skip \
--tags=~@eu-exit \
${TAGS} \
--name "${title}" && {
echo "${BROWSER} passed: ${title}"
} || {
echo "${BROWSER} failed: ${title}"
}
done
echo "Found `ls -la results_${BROWSER}_${CIRCLE_NODE_INDEX}/*.json | wc -l` JSON Allure result files in results_${BROWSER}_${CIRCLE_NODE_INDEX}/"
echo "Found `ls -la junit_reports_${BROWSER}_${CIRCLE_NODE_INDEX}/*.xml | wc -l` JUnit XML result files in junit_reports_${BROWSER}_${CIRCLE_NODE_INDEX}/"
echo "Saving environment variables that control test execution"
../../save_test_related_env_vars.py
step_run_load_tests: &step_run_load_tests
run:
name: Run load tests
command: |
. venv/bin/activate
python ./env_vars/env_writer.py --env=${TEST_ENV} --config=./env_vars/env.json
source ./env_vars/.env_with_export;
NUM_USERS=${NUM_USERS} HATCH_RATE=${HATCH_RATE} RUN_TIME=${RUN_TIME} make load_test_${SERVICE}
step_run_test_cms_pages_return_200: &step_run_test_cms_pages_return_200
run:
name: Run CMS Checker
command: |
. venv/bin/activate
make test_cms_pages_return_200
step_generate_cms_page_status_report: &step_generate_cms_page_status_report
run:
name: Generate CMS Page Status report
command: |
. venv/bin/activate
make cms_page_status_report
step_run_content_diff: &step_run_content_diff
run:
name: Run Content Diff tests
command: |
. venv/bin/activate
SERVICE=${SERVICE} ENVS_TO_COMPARE=${ENVS_TO_COMPARE} make compare_content
step_run_dead_links_checker: &step_run_dead_links_checker
run:
name: Run Dead Links Checker script
command: |
. venv/bin/activate
python ./env_vars/env_writer.py --env=${TEST_ENV} --config=./env_vars/env_dead_link_checker.json
source ./env_vars/.env_with_export;
TEST_ENV=${TEST_ENV} make dead_links_check
make dead_links_list > ./reports/dead_links_report.txt
step_run_geckoboard_updater: &step_run_geckoboard_updater
run:
name: Run Geckoboard Updater script
command: |
. venv/bin/activate
make geckoboard_updater
# this step requires Java 8+ to work.
step_merge_junit_xml_reports_from_periodic_tasks: &step_merge_junit_xml_reports_from_periodic_tasks
run:
name: Merge JUnit XML reports
when: always
command: |
python3 -m venv venv
. venv/bin/activate
cd ./reports
junit-merge *.xml -o merged.xml
ls *.xml | grep -v merged.xml | xargs rm
cd ../
./print_error_summary.py --report ./reports/merged.xml
# this step requires Java 8+ to work.
step_merge_junit_xml_reports_from_functional_tests: &step_merge_junit_xml_reports_from_functional_tests
run:
name: Merge JUnit XML reports & print errors summary
when: always
command: |
python3 -m venv venv
. venv/bin/activate
cd ./tests/functional/reports
junit-merge *.xml -o merged.xml
ls *.xml | grep -v merged.xml | xargs rm
cd ../../../
./print_error_summary.py --report ./tests/functional/reports/merged.xml
# this step requires Java 8+ to work.
step_merge_junit_xml_reports_from_parallel_browser_tests: &step_merge_junit_xml_reports_from_parallel_browser_tests
run:
name: Merge JUnit XML reports & print errors summary
when: always
command: |
python3 -m venv venv
. venv/bin/activate
pip install --quiet --upgrade pip
cd ./tests/browser/
mkdir junit_report
mv junit_reports_* junit_report/
ls -la junit_report/
junit-merge --recursive --dir junit_report/ --out ./junit_report/merged.xml
rm -fr junit_report/junit_reports_*
cd ../../
./print_error_summary.py --report ./tests/browser/junit_report/merged.xml
step_persist_fas_results: &step_persist_fas_results
persist_to_workspace:
root: .
paths:
- results_fas
step_persist_sso_results: &step_persist_sso_results
persist_to_workspace:
root: .
paths:
- results_sso
step_persist_profile_results: &step_persist_profile_results
persist_to_workspace:
root: .
paths:
- results_profile
step_persist_international_results: &step_persist_international_results
persist_to_workspace:
root: .
paths:
- results_international
# Lists of steps
steps_setup_env_for_smoke_tests: &steps_setup_env_for_smoke_tests
steps:
- *step_checkout_repo
- *step_install_requirements_for_smoke_tests
- *step_cache_smoke_tests_requirements
steps_setup_env_for_functional_tests: &steps_setup_env_for_functional_tests
steps:
- *step_checkout_repo
- *step_install_requirements_for_functional_tests
- *step_cache_functional_tests_requirements
steps_setup_env_for_parallel_browser_tests_using_circleci: &steps_setup_env_for_parallel_browser_tests_using_circleci
steps:
- *step_checkout_repo
- *step_install_requirements_for_parallel_browser_tests
- *step_cache_browser_tests_requirements
steps_setup_env_for_load_tests: &steps_setup_env_for_load_tests
steps:
- *step_checkout_repo
- *step_install_requirements_for_load_tests
- *step_cache_load_tests_requirements
steps_smoke_tests: &steps_smoke_tests
steps:
- *step_restore_cached_smoke_tests_requirements
- *step_run_smoke_tests
- *step_install_moxci
- *step_install_allure_cli
- *step_save_test_related_env_vars
- *step_make_allure_report
- store_test_results:
path: ./reports
- store_artifacts:
path: ./reports
- store_artifacts:
path: ./allure_report
destination: allure_report
- run:
name: Push Allure report link to Slack with moxci
when: always
command: |
set -e
export CIRCLE_PULL_REQUEST="${CIRCLE_PULL_REQUEST:-none}"
export WORKFLOW_LINK="https://circleci.com/workflow-run/${CIRCLE_WORKFLOW_ID}"
export summary="$(./parse_test_summary_json.py allure_report/widgets/summary.json)"
moxci allure_report/index.html --slack_message "The latest report from SMOKE tests ran against `awk '/Environment/{print toupper($3)}' ./results/environment.properties`. ${summary}. (workflow → ${WORKFLOW_LINK})"
steps_merge_browser_allure_results_and_generate_report_and_send_link_to_slack: &steps_merge_browser_allure_results_and_generate_report_and_send_link_to_slack
steps:
- checkout
- attach_workspace:
at: ./
- *step_install_moxci
- *step_install_allure_cli
- *step_update_allure_result_files_generated_by_browser_tests
- *step_make_allure_report
- store_artifacts:
path: ./allure_report/
destination: allure_report
- run:
name: Push Allure report link to Slack with moxci
when: always
command: |
set -e
export CIRCLE_PULL_REQUEST="${CIRCLE_PULL_REQUEST:-none}"
export WORKFLOW_LINK="https://circleci.com/workflow-run/${CIRCLE_WORKFLOW_ID}"
export summary="$(./parse_test_summary_json.py allure_report/widgets/summary.json)"
moxci allure_report/index.html --slack_message "The latest report from BROWSER tests ran against `awk '/Environment/{print toupper($3)}' ./results/environment.properties`. ${summary}. (workflow → ${WORKFLOW_LINK})"
steps_generate_allure_report_from_functional_tests_and_send_link_to_slack: &steps_generate_allure_report_from_functional_tests_and_send_link_to_slack
steps:
- checkout
- attach_workspace:
at: ./
- *step_install_moxci
- *step_install_allure_cli
- *step_update_allure_result_files_generated_by_functional_tests
- *step_make_allure_report
- store_artifacts:
path: ./allure_report/
destination: allure_report
- run:
name: Push Allure report link to Slack with moxci
when: always
command: |
set -e
export CIRCLE_PULL_REQUEST="${CIRCLE_PULL_REQUEST:-none}"
export WORKFLOW_LINK="https://circleci.com/workflow-run/${CIRCLE_WORKFLOW_ID}"
export summary="$(./parse_test_summary_json.py allure_report/widgets/summary.json)"
moxci allure_report/index.html --slack_message "The latest report from FUNCTIONAL tests ran against `awk '/Environment/{print toupper($3)}' ./results/environment.properties`. ${summary}. (workflow → ${WORKFLOW_LINK})"
steps_delete_test_data: &steps_delete_test_data
steps:
- *step_restore_cached_functional_tests_requirements
- *step_delete_test_data
steps_functional_tests_and_persist_fas_results: &steps_functional_tests_and_persist_fas_results
steps:
- *step_restore_cached_functional_tests_requirements
- *step_run_functional_tests
- *step_save_test_related_env_vars
- *step_install_junit_merge
- *step_merge_junit_xml_reports_from_functional_tests
- store_test_results:
path: ./tests/functional/reports
- store_artifacts:
path: ./tests/functional/reports
- *step_persist_fas_results
steps_functional_tests_and_persist_sso_results: &steps_functional_tests_and_persist_sso_results
steps:
- *step_restore_cached_functional_tests_requirements
- *step_run_functional_tests
- *step_save_test_related_env_vars
- *step_install_junit_merge
- *step_merge_junit_xml_reports_from_functional_tests
- store_test_results:
path: ./tests/functional/reports
- store_artifacts:
path: ./tests/functional/reports
- *step_persist_sso_results
steps_functional_tests_and_persist_profile_results: &steps_functional_tests_and_persist_profile_results
steps:
- *step_restore_cached_functional_tests_requirements
- *step_run_functional_tests
- *step_save_test_related_env_vars
- *step_install_junit_merge
- *step_merge_junit_xml_reports_from_functional_tests
- store_test_results:
path: ./tests/functional/reports
- store_artifacts:
path: ./tests/functional/reports
- *step_persist_profile_results
steps_functional_tests_and_persist_international_results: &steps_functional_tests_and_persist_international_results
steps:
- *step_restore_cached_functional_tests_requirements
- *step_run_functional_tests
- *step_save_test_related_env_vars
- *step_install_junit_merge
- *step_merge_junit_xml_reports_from_functional_tests
- store_test_results:
path: ./tests/functional/reports
- store_artifacts:
path: ./tests/functional/reports
- *step_persist_international_results
steps_run_parallel_browser_tests: &steps_run_parallel_browser_tests
steps:
- *step_restore_cached_browser_tests_requirements
- *step_prepare_list_of_scenarios_to_run_by_parallel_browser_tests
- *step_run_browser_tests_in_parallel
- persist_to_workspace:
root: .
paths:
- .
steps_run_load_tests: &steps_run_load_tests
steps:
- *step_restore_cached_load_tests_requirements
- *step_run_load_tests
- store_artifacts:
path: ./reports
steps_setup_env_for_periodic_tasks: &steps_setup_env_for_periodic_tasks
steps:
- *step_checkout_repo
- *step_install_requirements_for_periodic_tasks
- *step_cache_periodic_tasks_requirements
steps_run_test_cms_pages_return_200: &steps_run_test_cms_pages_return_200
steps:
- *step_restore_cached_periodic_tasks_requirements
- *step_run_test_cms_pages_return_200
- store_test_results:
path: ./reports
- store_artifacts:
path: ./reports
steps_generate_cms_page_status_report: &steps_generate_cms_page_status_report
steps:
- *step_restore_cached_periodic_tasks_requirements
- *step_generate_cms_page_status_report
- store_test_results:
path: ./reports
- store_artifacts:
path: ./reports
steps_content_diff: &steps_content_diff
steps:
- *step_restore_cached_periodic_tasks_requirements
- *step_run_content_diff
- store_test_results:
path: ./reports
- store_artifacts:
path: ./reports
steps_dead_links_checker: &steps_dead_links_checker
steps:
- *step_restore_cached_periodic_tasks_requirements
- *step_run_dead_links_checker
- store_test_results:
path: ./reports
- store_artifacts:
path: ./reports
steps_geckoboard_updater: &steps_geckoboard_updater
steps:
- *step_restore_cached_periodic_tasks_requirements
- *step_run_geckoboard_updater
jobs:
setup_env_for_smoke_tests:
working_directory: ~/directory-tests
<<: [
*machine_python3_node_browsers,
*steps_setup_env_for_smoke_tests,
]
setup_env_for_functional_tests:
working_directory: ~/directory-tests
<<: [
*machine_python3_node_browsers,
*steps_setup_env_for_functional_tests,
]
setup_env_for_load_tests:
working_directory: ~/directory-tests
<<: [
*machine_python3_node,
*steps_setup_env_for_load_tests,
]
setup_env_for_parallel_browser_tests_using_circleci:
working_directory: ~/directory-tests
<<: [
*machine_python3_node_browsers,
*steps_setup_env_for_parallel_browser_tests_using_circleci,
]
smoke_tests_dev:
working_directory: ~/directory-tests
environment:
TEST_ENV: "dev"
PYTEST_ARGS: '-m "not stage and not uat and not prod"'
<<: [
*machine_python3_node_browsers,
*steps_smoke_tests,
]
smoke_tests_stage:
working_directory: ~/directory-tests
environment:
TEST_ENV: "stage"
PYTEST_ARGS: "-m 'not dev and not uat and not prod'"
<<: [
*machine_python3_node_browsers,
*steps_smoke_tests,
]
smoke_tests_uat:
working_directory: ~/directory-tests
environment:
TEST_ENV: "uat"
PYTEST_ARGS: "-m 'not dev and not stage and not prod'"
<<: [
*machine_python3_node_browsers,
*steps_smoke_tests,
]
func_fas_test_dev:
working_directory: ~/directory-tests
environment:
TEST_ENV: "dev"
FEATURE_DIR: "fas"
TAGS: "--tags=~@stage-only --tags=~@uat-only"
<<: [
*machine_python3_node_browsers,
*steps_functional_tests_and_persist_fas_results,
]
func_sso_test_dev:
working_directory: ~/directory-tests
environment:
TEST_ENV: "dev"
FEATURE_DIR: "sso"
TAGS: "--tags=~@stage-only --tags=~@uat-only"
<<: [
*machine_python3_node_browsers,
*steps_functional_tests_and_persist_sso_results,
]
func_profile_test_dev:
working_directory: ~/directory-tests
environment:
TEST_ENV: "dev"
FEATURE_DIR: "profile"
TAGS: "--tags=~@stage-only --tags=~@uat-only"
<<: [
*machine_python3_node_browsers,
*steps_functional_tests_and_persist_profile_results,
]
func_international_test_dev:
working_directory: ~/directory-tests
environment:
TEST_ENV: "dev"
FEATURE_DIR: "international"
TAGS: "--tags=~@stage-only --tags=~@uat-only"
<<: [
*machine_python3_node_browsers,
*steps_functional_tests_and_persist_international_results,
]
func_fas_test_stage:
working_directory: ~/directory-tests
environment:
TEST_ENV: "stage"
FEATURE_DIR: "fas"
TAGS: "--tags=~@dev-only --tags=~@uat-only"
<<: [
*machine_python3_node_browsers,
*steps_functional_tests_and_persist_fas_results,
]
func_sso_test_stage:
working_directory: ~/directory-tests
environment:
TEST_ENV: "stage"
FEATURE_DIR: "sso"
TAGS: "--tags=~@dev-only --tags=~@uat-only"
<<: [
*machine_python3_node_browsers,
*steps_functional_tests_and_persist_sso_results,
]
func_profile_test_stage:
working_directory: ~/directory-tests
environment:
TEST_ENV: "stage"
FEATURE_DIR: "profile"
TAGS: "--tags=~@dev-only --tags=~@uat-only"
<<: [
*machine_python3_node_browsers,
*steps_functional_tests_and_persist_profile_results,
]
func_international_test_stage:
working_directory: ~/directory-tests
environment:
TEST_ENV: "stage"
FEATURE_DIR: "international"
TAGS: "--tags=~@dev-only --tags=~@uat-only"
<<: [
*machine_python3_node_browsers,
*steps_functional_tests_and_persist_international_results,
]
func_fas_test_uat:
working_directory: ~/directory-tests
environment:
TEST_ENV: "uat"
FEATURE_DIR: "fas"
TAGS: "--tags=~@stage-only"
<<: [
*machine_python3_node_browsers,
*steps_functional_tests_and_persist_fas_results,
]
func_sso_test_uat:
working_directory: ~/directory-tests
environment:
TEST_ENV: "uat"
FEATURE_DIR: "sso"
TAGS: "--tags=~@stage-only"
<<: [
*machine_python3_node_browsers,
*steps_functional_tests_and_persist_sso_results,
]
func_profile_test_uat:
working_directory: ~/directory-tests
environment:
TEST_ENV: "uat"
FEATURE_DIR: "profile"
TAGS: "--tags=~@stage-only"
<<: [
*machine_python3_node_browsers,
*steps_functional_tests_and_persist_profile_results,
]
func_international_test_uat:
working_directory: ~/directory-tests
environment:
TEST_ENV: "uat"
FEATURE_DIR: "international"
TAGS: "--tags=~@stage-only"
<<: [
*machine_python3_node_browsers,
*steps_functional_tests_and_persist_international_results,
]
delete_test_data_dev:
working_directory: ~/directory-tests
environment:
TEST_ENV: "dev"
<<: [
*machine_python3_node_browsers,
*steps_delete_test_data,
]
delete_test_data_stage:
working_directory: ~/directory-tests
environment:
TEST_ENV: "stage"
<<: [
*machine_python3_node_browsers,
*steps_delete_test_data,
]
delete_test_data_uat:
working_directory: ~/directory-tests
environment:
TEST_ENV: "uat"
<<: [
*machine_python3_node_browsers,
*steps_delete_test_data,
]
load_cms_tests_stage:
working_directory: ~/directory-tests
environment:
SERVICE: "cms"
TEST_ENV: "stage"
<<: [
*load_hatch_rate,
*load_num_users,
*load_run_time,
]
<<: [
*machine_python3_node,
*steps_run_load_tests,
]
load_soo_tests_stage:
working_directory: ~/directory-tests
environment:
SERVICE: "soo"
TEST_ENV: "stage"
<<: [
*load_hatch_rate,
*load_num_users,
*load_run_time,
]
<<: [
*machine_python3_node,
*steps_run_load_tests,
]
load_fab_tests_stage:
working_directory: ~/directory-tests
environment:
SERVICE: "fab"
TEST_ENV: "stage"
<<: [
*load_hatch_rate,
*load_num_users,
*load_run_time,
]
<<: [
*machine_python3_node,
*steps_run_load_tests,
]
load_fas_tests_stage:
working_directory: ~/directory-tests
environment:
SERVICE: "fas"
TEST_ENV: "stage"
<<: [
*load_hatch_rate,
*load_num_users,
*load_run_time,
]
<<: [
*machine_python3_node,
*steps_run_load_tests,
]
load_isd_tests_stage:
working_directory: ~/directory-tests
environment:
SERVICE: "isd"
TEST_ENV: "stage"
<<: [
*load_hatch_rate,
*load_num_users,
*load_run_time,
]
<<: [
*machine_python3_node,
*steps_run_load_tests,
]
load_international_tests_stage:
working_directory: ~/directory-tests
environment:
SERVICE: "international"
TEST_ENV: "stage"
<<: [
*load_hatch_rate,
*load_num_users,
*load_run_time,
]
<<: [
*machine_python3_node,
*steps_run_load_tests,
]
load_invest_tests_stage:
working_directory: ~/directory-tests
environment:
SERVICE: "invest"
TEST_ENV: "stage"
<<: [
*load_hatch_rate,
*load_num_users,
*load_run_time,
]
<<: [
*machine_python3_node,
*steps_run_load_tests,
]
load_domestic_tests_stage:
working_directory: ~/directory-tests
environment:
SERVICE: "domestic"
TEST_ENV: "stage"
<<: [
*load_hatch_rate,
*load_num_users,
*load_run_time,
]
<<: [
*machine_python3_node,
*steps_run_load_tests,
]
load_erp_tests_stage:
working_directory: ~/directory-tests
environment:
SERVICE: "erp"
TEST_ENV: "stage"
<<: [
*load_hatch_rate,
*load_num_users,
*load_run_time,
]
<<: [
*machine_python3_node,
*steps_run_load_tests,
]