gitlab - Codeception 和 GitLab CI 无法运行
问题描述
目前我正在尝试在 GitLab CI 中配置 Codeception,但遇到了问题。
这是我的 gitlab-ci.yml
stages:
- run
variables:
TEST_URL: "example"
run-chrome:
stage: run
tags:
- docker
image: php:7.2-cli-alpine
services:
- name: selenium/standalone-chrome
alias: chrome
script:
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install
- echo Running tests on $TEST_URL
- vendor/bin/codecept run --env docker-chrome
artifacts:
paths:
- tests/_output
expire_in: 7 day
when: on_failure
我在我的 composer.json 中使用 Codeception 4.0。
我的acceptance.suite.yml 看起来像:
class_name: AcceptanceTester
modules:
enabled:
- Helper\WebDriver
- Helper\Acceptance
extensions:
enable:
- Codeception\Extension\Recorder
step_decorators:
- \Codeception\Step\Retry
- \Codeception\Step\TryTo
env:
docker-chrome:
modules:
config:
Helper\WebDriver:
browser: chrome
host: chrome
wait: 5
capabilities:
chromeOptions:
args: ["--headless", "--disable-gpu"]
我收到的错误消息是:
[RuntimeException] 调用未定义的方法 AcceptanceTester::seeInCurrentURL
我希望有一个人可以帮助我。
解决方案
推荐阅读
- php - PHP - 如何不在登录页面上启动会话
- mysql - MySQL Load Data Infile (CSV):替换/删除垂直标签
- excel - 输入 Power BI 之前的数据格式
- c++ - 第一个参数设置为第二个作为默认参数的模板化 C++ 函数
- c# - xUnit 抽象测试类,带有带参数的虚拟测试方法
- c++ - 为什么可变参数宏如此令人不快?
- reactjs - 如何对包含在 memo 和 withStyles 中的 React 组件进行浅层测试?
- javascript - 在逻辑之前使用异步调用渲染组件反应 HOC
- android-source - X (java:sdk) 不应链接到 Y (java:platform)
- angular - Angular 7路由器导航无法路由到子组件