【问题标题】:Cypress could not find spec files赛普拉斯找不到规格文件
【发布时间】:2021-05-31 10:22:41
【问题描述】:

我正在尝试在 docker 容器中运行 cypress 测试。

当我的测试规范文件位于 ./cypress 文件夹中时,它可以工作,因为 cypress 会查找默认文件夹(cypress/integration),但是当我使用不同的测试规范文件路径时它找不到规范文件(试图覆盖默认文件夹) ;

我正在使用下面的 docker 命令;

docker run -it -v $PWD:/e2e -w /e2e cypress/included:6.2.1 cypress run --config integrationFolder=tests --spec 'tests/spec.js'

错误:

Can't run because no spec files were found.

We searched for any files matching this glob pattern:

tests/spec.js

【问题讨论】:

    标签: javascript docker cypress docker-run


    【解决方案1】:

    您可以通过如下配置 cypress.json 文件来使用自己的测试文件夹路径;

    {   
        "integrationFolder": "tests"
    }
    

    【讨论】:

      猜你喜欢
      • 2021-11-04
      • 2020-12-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-06-27
      • 1970-01-01
      • 2019-04-15
      相关资源
      最近更新 更多