本文介紹了使用 Gradle 運(yùn)行 Karma?的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!
問題描述
限時(shí)送ChatGPT賬號(hào)..
我有想要運(yùn)行的 Jasmine 單元測試并獲得伊斯坦布爾代碼覆蓋率報(bào)告.我可以運(yùn)行一個(gè)命令行腳本來在 Jenkins 中運(yùn)行 Karma,但是使用我的 build.gradle 執(zhí)行所有內(nèi)容會(huì)很好.
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 運(yùn)行 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 文件中創(chuàng)建并運(yùn)行一個(gè)可執(zhí)行任務(wù)解決了這個(gè)問題:
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'
}
這篇關(guān)于使用 Gradle 運(yùn)行 Karma?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!