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?


基础教程推荐
- npm start 错误与 create-react-app 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
- Bokeh Div文本对齐 2022-01-01
- 检查 HTML5 拖放文件类型 2022-01-01
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
- Bootstrap 模态出现在背景下 2022-01-01