I'm searching for a simple solution for passing parameters to tests (using env vars, additional files not suitable. I need to pass values via command line) Currently I have following solution: Passing parameters via SBT_OPTS:
SBT_OPTS="-DparamName=value" sbt moduleName/test
And retrieving value in test:
Option(System.getProperty("myProperty")).getOrElse("defaultValue")
Unfortunately this solution doesn't fit any more. Are there any simple solutions like this, but without using SBT_OPTS?
Thanks.
Command:
sbt -Dparam=value module/test
Retrieving value:
sys.props.getOrElse("param", DEFAULT_VALUE)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With