https://gitlab.com/racinmat/ZKS_gitlab_ci_selenium
https://github.com/racinmat/workshop-codeception
windows: java -Dwebdriver.chrome.driver="%cd%\chromedriver.exe" -jar "%cd%\selenium-server-standalone-2.47.1.jar"
linux: java -Dwebdriver.chrome.driver="./chromedriver" -jar "./selenium-server-standalone-2.47.1.jar"
.\vendor\bin\codecept bootstrap
.\vendor\bin\codecept build
.\vendor\bin\codecept generate:cept acceptance <name>
.\vendor\bin\codecept run acceptance <fileName>
variables:
GITLAB_SELENIUM_SERVER_IMAGE_NAME: registry.gitlab.com/gitlab-org/gitlab-selenium-server
selenium_test:
stage: selenium_test
image: <váš image>
before_script:
- "composer install --prefer-dist --no-interaction --no-progress --no-suggest --no-scripts --optimize-autoloader"
- "cp app/config/parameters_test.yml app/config/parameters.yml"
- "cp codeception.parameters.yml.gitlab codeception.parameters.yml"
script:
- "vendor/bin/codecept run acceptance"
artifacts:
paths:
- var/logs
- tests/_output
when: on_failure
services:
- name: $GITLAB_SELENIUM_SERVER_IMAGE_NAME:test
alias: gitlab-selenium-server
only:
- schedules
- web