![](/img/trans.png)
[英]Passing bash variable from gitlab-ci file as an extra argument to ansible job
[英]Save a file from gitlab-ci to a gitlab repository
我制作了这个 citlab-ci.yml 文件,但最后我可以在我的仓库中找到 html 报告。
你能告诉我为什么吗?
image: python
services:
- selenium/standalone-chrome:latest
variables:
selenium_remote_url: "http://selenium__standalone-chrome:4444/wd/hub"
cucumber:
script:
- python --version
- pwd
- ls
- pip install pytest
- pip install pytest_bdd
- pip install selenium
- pip install chromedriver
- pip install pytest-html
- cd test_pytest
- ls
- python -m pytest step_defs/test_web_steps.py --html=report.html
德克萨斯哈德里安
您实际上可以在 gitlab 中生成测试报告。 为此,从 Pytest 生成 XML 报告,该报告将作为工件存储在 GitLab 中。 在您的.gitlab-ci.yml
文件中
image: python:3.6
stages:
- test
testing:
stage: test
when: manual
script:
...
- pytest --junitxml=report.xml
artifacts:
when: always
reports:
junit: report.xml
或在管道的Tests
标签下将其可视化。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.