vendredi 23 juin 2017

SBT : Overriding default test task

In our play project, we are running scoverage coverageReport using the following command:

sbt clean coverage test coverageReport

Instead of the explicit coverageReport goal , I want to run the report as part of test goal itself , something like

sbt test

should automatically run the coverageReport as well

I am a newbie for sbt/play so I am trying something like

test = test ++ ScoverageKeys.coverageReport

and few other options but nothing worked.

Could some one let me know how to override default test config so that it runs the coverage and coverageReport too in addition to running tests?

It would be nice if test goal triggers coverage before starting tests and coverageReport after finishing tests

Thanks Suresh

Aucun commentaire:

Enregistrer un commentaire