docker-compose - 在 cypress docker-compose setup 上运行特定的规范文件
问题描述
我有一个 docker-compose 文件来运行 cypress 测试,但我看到它正在识别集成文件夹中的所有规范文件并运行测试。我想运行规范文件的一个子集。例如:只有一个特定的规范文件。
我尝试使用命令:并且柏树运行没有帮助的特定文件。有没有办法使用 docker-compose 设置运行特定的规范文件。
version: '3.2'
services:
cypress:
image: 'cypress/included:6.6.0'
environment:
- CYPRESS_environment=test
working_dir: /test
volumes:
- ./:/test
解决方案
如果您查看它使用入口点的 Dockerfile,那么您可以在撰写文件中使用命令参数来运行特定文件
version: '3.2'
services:
cypress:
image: 'cypress/included:6.6.0'
environment:
- CYPRESS_environment=test
working_dir: /test
volumes:
- ./:/test
command: "--spec /test/integration/mytest.js"
推荐阅读
- nginx - 如何将自定义 /location 设置为 /location/index.html
- android - 如何将自定义警报对话框中的项目添加到列表视图?
- django - Django - 如何控制和过滤相关对象
- unix - 如何在 UNIX 中拆分 ISO 8601 日期/时间列?
- python - pyplot 用不正确的 y 轴裁剪数据
- java - 如何清除用户控制台?
- jquery - 数据表分页数超过预期数
- android - 如何访问Android Q中的所有图片?
- python - 使用递归函数获取树的高度
- firebase - request.resource 对象在读取请求的上下文中使用安全规则向 Firestore