最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Run Karma using Gradle? - Stack Overflow

programmeradmin4浏览0评论

I have Jasmine unit tests that I would like to run and get Istanbul code coverage reports for. I can run a mand line script to run Karma in Jenkins, but it would be nice to have everything execute using my build.gradle.

Is it possible to run Karma using Gradle? I've searched google, but I can't seem to find a solution.

Thanks

I have Jasmine unit tests that I would like to run and get Istanbul code coverage reports for. I can run a mand line script to run Karma in Jenkins, but it would be nice to have everything execute using my build.gradle.

Is it possible to run Karma using Gradle? I've searched google, but I can't seem to find a solution.

Thanks

Share Improve this question asked Apr 11, 2014 at 20:05 EricEric 4871 gold badge6 silver badges16 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 8

I solved this by creating and running an executable task in the build.gradle file:

task karma(type:Exec) 
{
    mandLine 'karma', 'start', '--single-run true'
}

Following up here for anyone searching this in 2016 or later:

There's now a Gradle Karma Plugin that is worth considering.

发布评论

评论列表(0)

  1. 暂无评论