File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ docker/docker-compose.override.yml
1717behat.yml
1818features /* .html
1919features /* .png
20+ features /junit /
2021.cache /
2122.editorconfig
2223.gitattributes
Original file line number Diff line number Diff line change @@ -257,14 +257,15 @@ test:behat:
257257 script :
258258 - echo "Starting job script in ${BUILD_DIR}"
259259 - cd ${BUILD_DIR}
260- - make behat
260+ - BEHAT_ARGS='--colors -f pretty -o std -f junit -o features/junit' make behat
261261 after_script :
262262 - cd ${BUILD_DIR}
263263 - make browser_driver_stop
264264 - rm -rf web/screenshots
265265 - mkdir web/screenshots
266266 - mv features/*.png web/screenshots/
267267 - echo "- Screenshots are available here :" && cd web/screenshots && ls -h *.png | xargs -i echo "${CI_ENVIRONMENT_URL}/screenshots/{}"
268+ - mv ${BUILD_DIR}/features/junit ${CI_PROJECT_DIR}
268269 retry :
269270 max : 2
270271 when : script_failure
@@ -273,6 +274,13 @@ test:behat:
273274 allow_failure : false
274275 << : *runner_tag_selection
275276 << : *only_branches
277+ artifacts :
278+ expire_in : 1 week
279+ when : always
280+ paths :
281+ - junit/*.xml
282+ reports :
283+ junit : junit/*.xml
276284
277285test:cinsp :
278286 stage : tests
Original file line number Diff line number Diff line change 125125endif
126126
127127# # Validate Behat scenarios
128+ BEHAT_ARGS ?= --colors
128129behat :
129130 @echo " Getting base url"
130131ifdef REVIEW_DOMAIN
@@ -143,7 +144,7 @@ endif
143144 @echo "Running Behat scenarios against http://$(BASE_URL)"
144145 $(call php, composer install -o)
145146 $(call php, vendor/bin/behat -V)
146- $(call php, vendor/bin/behat --colors) || $(call php, vendor/bin/behat --colors --rerun)
147+ $(call php, vendor/bin/behat $(BEHAT_ARGS)) || $(call php, vendor/bin/behat $(BEHAT_ARGS) --rerun)
147148 make browser_driver_stop
148149
149150# # List existing behat definitions
You can’t perform that action at this time.
0 commit comments