Run Karma using Gradle?(使用 Gradle 运行 Karma?)
问题描述
我有想要运行的 Jasmine 单元测试并获得伊斯坦布尔代码覆盖率报告.我可以运行一个命令行脚本来在 Jenkins 中运行 Karma,但是使用我的 build.gradle 执行所有内容会很好.
I have Jasmine unit tests that I would like to run and get Istanbul code coverage reports for. I can run a command line script to run Karma in Jenkins, but it would be nice to have everything execute using my build.gradle.
是否可以使用 Gradle 运行 Karma?google了一下,好像没找到解决办法.
Is it possible to run Karma using Gradle? I've searched google, but I can't seem to find a solution.
谢谢
推荐答案
我通过在 build.gradle 文件中创建并运行一个可执行任务解决了这个问题:
I solved this by creating and running an executable task in the build.gradle file:
task karma(type:Exec)
{
commandLine 'karma', 'start', '--single-run true'
}
这篇关于使用 Gradle 运行 Karma?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 Gradle 运行 Karma?


- 如何显示带有换行符的文本标签? 2022-01-01
- 在不使用循环的情况下查找数字数组中的一项 2022-01-01
- 是否可以将标志传递给 Gulp 以使其以不同的方式 2022-01-01
- 如何调试 CSS/Javascript 悬停问题 2022-01-01
- 如何向 ipc 渲染器发送添加回调 2022-01-01
- 我不能使用 json 使用 react 向我的 web api 发出 Post 请求 2022-01-01
- 为什么我的页面无法在 Github 上加载? 2022-01-01
- 从原点悬停时触发 translateY() 2022-01-01
- 为什么悬停在委托事件处理程序中不起作用? 2022-01-01
- 使用 iframe URL 的 jQuery UI 对话框 2022-01-01