scoverage

scoverage: Combine Coverage from test and it:test

半世苍凉 提交于 2020-05-13 02:05:10
问题 I splitted my Unit- and Integration-Tests with a Filter: lazy val FunTest = config("it") extend Test def funTestFilter(name: String): Boolean = name endsWith "Spec" def unitTestFilter(name: String): Boolean = name endsWith "Test" ... testOptions in Test := Seq(Tests.Filter(unitTestFilter)), testOptions in FunTest := Seq(Tests.Filter(funTestFilter)), ... So I can do something like that: sbt clean coverage test dockerComposeUp it:test dockerComposeStop coverageReport Sadly that kills all my

SBT Coverage “exclude” used in Play application

夙愿已清 提交于 2019-12-10 10:24:00
问题 I used the sbt-scoverage for our Play application. I used the following config to exclude both Reverse and Routes generated file. coverageExcludedPackages := ";Reverse.;Routes.;" However this can only exclude generated Reverse scala files and can't exclude Routes files. Even I use the following script, it does the same coverageExcludedPackages := ";Routes.*;" Anyone knows what is the correct regex should be? 回答1: As an improvement to @socom1880's answer, this worked for me by adding it to

SBT Coverage “exclude” used in Play application

非 Y 不嫁゛ 提交于 2019-12-05 19:37:05
I used the sbt-scoverage for our Play application. I used the following config to exclude both Reverse and Routes generated file. coverageExcludedPackages := ";Reverse.;Routes.;" However this can only exclude generated Reverse scala files and can't exclude Routes files. Even I use the following script, it does the same coverageExcludedPackages := ";Routes.*;" Anyone knows what is the correct regex should be? As an improvement to @socom1880's answer, this worked for me by adding it to build.sbt coverageExcludedPackages := "<empty>;Reverse.*;router\\.*" Try coverageExcludedPackages := "<empty>