docker - 错误:提供的 “html”报告者不存在

标签 docker automated-tests report e2e-testing testcafe

我的目标是使用docker图像生成HTML报告。似乎官方的testcafe docker镜像没有用于HTML报告生成器的npm软件包。因此,我开始创建自己的docker镜像。

Dockerfile:

从testcafe / testcafe:latest

USER根

运行cd / opt / testcafe /
&& npm install-保存testcafe-reporter-cucumber-json @ latest \
&& npm install --save-dev multiple-cucumber-html-reporter \
&& npm安装testcafe-reporter-html

这是命令,我正在运行以运行测试:

docker run --mount type = bind,source = // c / Users / sbhas1 / parc-apps / tests / mo-po-dashboard,target = / tests --mount type = bind,source = // c / Users / sbhas1 / parc-apps / reports,target = / reporters -w / reporters -it createefs / testcafereporterchrome /tests/season_test.js --reporter html:tests / reports / results.html

当我运行此程序时,出现错误
错误提供的“html”报告器不存在。检查您是否正确指定了报告格式。

因此,我的问题是:
1.我应该在容器中的哪里安装npm软件包? / opt / testcafe路径不正确?
2.如何进入容器查看文件夹结构?

最佳答案

我可以通过-g选项而不是本地安装npm软件包来解决此问题。现在,我可以使用docker image生成html报告。

最终的Dockerfile是:

从testcafe / testcafe:latest

USER根

运行cd / opt / testcafe \
&& npm install -g testcafe-reporter-cucumber-json @ latest \
&& npm install -g多个 cucumber -html-reporter @ latest \
&& npm install -g testcafe-reporter-html @ latest

展览1337 1338

关于docker - 错误:提供的 “html”报告者不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57975818/

相关文章:

golang 应用程序的 Docker 临时图像找不到二进制 "no such file or directory"

windows - Dockerfile:在路径中使用空格字符进行复制/添加 (Windows)

php - [PHP-MYSQL]报表查询

java - 使用 Java 从 XML 输出创建可读报告 (PDF)

java - 从 Java 代码运行报告时,Jasper Reports 不格式化数字

laravel - 无法通过 Docker 中的 Apache 访问我的 Laravel 项目 -/var/www/directory 为空

docker - Docker 中的 Kong DB-less

haskell - 在 Hedgehog 中通过 'Gen' 或通过 'forAll' 生成随机输入的区别

web - 如何关闭testcafe runner

c++ - Qt 自动 UI 测试因消息框而停止。如何模拟在消息框上输入?