简体   繁体   English

TestCafe 可以配置单文件报告器吗

[英]Can TestCafe be configured with single file reporter

I have been working in TestCafe recently and I need a custom reporter.我最近一直在 TestCafe 工作,我需要一个自定义记者。 I was looking for something like mocha reporter .我在找像mocha 记者这样的东西。 But all I could find is generating a plugin and publish it to npm.但我能找到的只是生成一个插件并将其发布到 npm。 Is there a way to have a single file reporter?有没有办法让一个文件记者?

Is there a way to have a single file reporter?有没有办法让一个文件记者?

You can redirect the reporter's output to the file.您可以将记者的 output 重定向到该文件。

testcafe chrome test.js -r spec:result.txt

I was looking for something like mocha reporter.我正在寻找类似摩卡记者的东西。

TestCafe ships with 5 reporters: spec, list, minimal, xUnit, JSON. TestCafe 附带 5 个报告器:spec、list、minimal、xUnit、JSON。 Also, many custom reporters can be find in npm: https://www.npmjs.com/search?q=testcafe-reporter .此外,许多自定义报告器可以在 npm: https://www.npmjs.com/search?q=testcafe-reporter中找到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM