如何运行python+;GitLab中的硒自动测试?
是否可以在GitLab中运行在Python+Selenium上编写的自动化测试? 我在网上找不到信息。我知道有Jenkins,但我想在GitLab中运行自动测试,然后在Allure中创建一个报告(如果可能的话) 是否可以在GitLab中运行在Python+Selenium上编写的自动化测试 有几种方法/类型的如何运行python+;GitLab中的硒自动测试?,python,selenium-webdriver,gitlab,automated-tests,gitlab-ci-runner,Python,Selenium Webdriver,Gitlab,Automated Tests,Gitlab Ci Runner,是否可以在GitLab中运行在Python+Selenium上编写的自动化测试? 我在网上找不到信息。我知道有Jenkins,但我想在GitLab中运行自动测试,然后在Allure中创建一个报告(如果可能的话) 是否可以在GitLab中运行在Python+Selenium上编写的自动化测试 有几种方法/类型的gitlab runner执行器:docker,docker compose,shell 带有dockergitlab runner executor的示例: .gitlab-ci.yml
gitlab runner执行器
:docker
,docker compose
,shell
带有docker
gitlab runner executor的示例:
.gitlab-ci.yml
这是一个使用gitlab ci
在python上执行selenium测试的可行示例
标签1.0.0给出了完整的简单示例
tag 2.0.0提供了更复杂的多浏览器示例
标记2.1.0提供的本地docker示例
免责声明:我为新手开发了PythonGitlab ci和另一个PythonCI模板,因此我将非常感谢项目中的反馈和请求
image: python:3.7.9-alpine
stages:
- test
e2e:chrome:
services:
- selenium/standalone-chrome # it's need to be configured with Remote webdriver in your tests to look at http://selenium__standalone-chrome:4444/wd/hub
before_script:
- pip3 install -r requirements.txt # you can optimize this step by building your own image with pre-installled requirements and using it instead of current python:3.7.9-alpine image
script:
- pytest /path/to/your/tests