Skip to content

How do you impose scala code coverage specifically for integration tests? #260

Open
@aditya2kx

Description

@aditya2kx

Am running the integration test using following sbt command

sbt clean coverage it:test coverageReport

This command runs integration tests, instruments it and generates report as well.

Build.sbt has following:

coverageMinimum in IntegrationTest := 21.0
coverageFailOnMinimum in IntegrationTest := true

Output looks like:

[info] Statement coverage.: 20.16%
[info] Branch coverage....: 12.00%
[info] Coverage reports completed
[info] All done. Coverage was [20.16%]

Output result has 20.16% code coverage but the limits in build.sbt are not enforcing the limit.

If I change build.sbt to following it works:

coverageMinimum := 21.0
coverageFailOnMinimum := true

Wanted to know what am I missing for specifying limits specifically for Integration tests

Version Information:

sbt : 0.13.17

sbt-scoverage : 1.5.1

Also asked at https://stackoverflow.com/questions/52266686/how-do-you-impose-scala-code-coverage-specifically-for-integration-tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions