Is there any tutorial for the scripted plugin? Or maybe a new way to test plugins. I've found a tutorial that seems to be a bit old.
If I have to resort to Scripted, some questions that come to my mind:
For the record, I'm also using the cross-build plugin, so if possible, the tests would need to cover both 0.12 and 0.13 versions.
Plugins can be installed for all your projects at once by declaring them in $HOME/. sbt/1.0/plugins/ .
Run Scala tests with coverageOpen your project. Open the test in question in the editor. icon and select the Run 'name' with Coverage option.
A plugin can define a sequence of sbt settings that are automatically added to all projects or that are explicitly declared for selected projects. For example, a plugin might add a proguard task and associated (overridable) settings. Finally, a plugin can define new commands (via the commands setting).
(Author of the linked testing sbt plugins here) There hasn't been major changes to scripted
since I first wrote it, but I updated some of the details.
scriptedLaunchOpts
, and catch it with System.getProperty
on the other side.Eugene's answer is still relevant, but now, Sbt Plugins Testing has a proper documentation page in the official sbt documnetation site:
http://www.scala-sbt.org/release/docs/Testing-sbt-plugins.html
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