【问题标题】:configuring how to run my robot framework test on gitlab-ci配置如何在 gitlab-ci 上运行我的机器人框架测试
【发布时间】:2019-07-17 12:38:35
【问题描述】:

我正在尝试新功能 gitlab-ci。并为我的烧瓶应用程序 app.py 和测试机器人框架 test.robot 配置 gitlab-ci.yml 文件

我是新手,尝试了一些资源,但都对我不起作用。

这是我的 .gitlab-ci.yml 文件:

image: python:3.6-stretch

stages:
  - robot_test
  - deploy

before_script:
    - pip install -r requirements.txt

test:
  stage: robot_test
  script:
    - python -m robotframework discover tests

它应该在我的 test.robot 中运行测试

【问题讨论】:

    标签: python-3.x continuous-integration robotframework gitlab-ci


    【解决方案1】:

    stages 用于定义作业可以使用的阶段,并且是全局定义的。

    来自文档:

    stages:
      - build
      - test
      - deploy
    
    • 首先,build 的所有作业都是并行执行的。
    • 如果build 的所有作业都成功,​​则test 作业将并行执行。
    • 如果test 的所有作业都成功,​​则deploy 作业将并行执行。

    在你的情况下:

    stages:
      - test
      - deploy
    

    test 内,您将执行robot_test

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-05-03
      • 2014-07-07
      • 1970-01-01
      • 2021-12-17
      • 2021-02-10
      • 2020-10-27
      • 2019-05-14
      相关资源
      最近更新 更多