File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed
Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,16 @@ To use the extensions you need to add this import to your Spark application or s
4040import za .co .absa .spark .hats .Extensions ._
4141```
4242
43+ ### How to generate Code coverage report
44+ ``` sbt
45+ sbt jacoco
46+ ```
47+ Code coverage will be generated on path:
48+ ```
49+ {local-path}\spark-hats\target\scala-2.XY\jacoco\report\html
50+ ```
51+
52+
4353## Motivation
4454
4555Here is a small example we will use to show you how ` spark-hats ` work. The important thing is that the dataframe
Original file line number Diff line number Diff line change @@ -48,3 +48,17 @@ lazy val hats = (project in file("."))
4848// release settings
4949releaseCrossBuild := true
5050addCommandAlias(" releaseNow" , " ;set releaseVersionBump := sbtrelease.Version.Bump.Bugfix; release with-defaults" )
51+
52+ // JaCoCo code coverage
53+ Test / jacocoReportSettings := JacocoReportSettings (
54+ s " spark-hats Jacoco Report - ${scalaVersion.value}" ,
55+ None ,
56+ JacocoThresholds (),
57+ Seq (JacocoReportFormats .HTML , JacocoReportFormats .XML ),
58+ " utf-8" )
59+
60+ // exclude example
61+ Test / jacocoExcludes := Seq (
62+ // "za.co.absa.spark.hats.transformations.NestedArrayTransformation*", // class and related objects
63+ // "za.co.absa.spark.hats.transformations.ArrayContext" // class only
64+ )
Original file line number Diff line number Diff line change 1717addSbtPlugin(" com.jsuereth" % " sbt-pgp" % " 2.0.0" )
1818addSbtPlugin(" com.github.gseitz" % " sbt-release" % " 1.0.12" )
1919addSbtPlugin(" de.heikoseeberger" % " sbt-header" % " 5.6.0" )
20+ addSbtPlugin(" com.github.sbt" % " sbt-jacoco" % " 3.4.0" )
2021
You can’t perform that action at this time.
0 commit comments