intellij idea - How to run functionnal/unit tests only -


as know in play, every tests (unit , functional) sit in test folder. how can mark our functional , unit tests in way can run functional tests in 1 run , unit tests in run?

and achieve without having package each type (meaning test/unit/... , test/functional/...). problem solution let's have app/auth folder (so auth package). unit tests in package unit/auth , not able see package private methods/fields/classes.

what right way this? how play expects achieve this?

imo, best way having 2 test folders, 1 unit, 1 functional. i'm afraid break sbt test , related tasks.

testing in play based on sbt

you can configure build.sbt test filters:

testoptions in test := seq(tests.filter(name => name contains "integrationtest"))

so allow run sbt custom:test , run tests pass testsfilter predicate.

lazy val custominttest = config("custom") extend test  lazy val root = (project in file(".")).enableplugins(playscala)   .configs(custominttest)   .settings(inconfig(custominttest)(defaults.testtasks):_*)   .settings(     testoptions in custominttest := seq(tests.filter(name => name.contains("identifier")))   ) 

e.g. mycoolidentifiertest run, mycooltest or mycoolidentifiertest not. 1 thing that's cool sbt test still run tests including custom filter


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -