This is a simple-build-tool plugin for running Cucumber features under cuke4duke
Simply run the cucumber
action to run all cucumber features under the features
directory. Step definitions go in src/test/scala/. See the cuke4duke wiki page for scala for more information.
The Cuke4Duke trait automatically addes the cuke4duke dependency for you. You may add junit for for asserting in your step definitions.
-
In your plugin definition file, add a dependency on cuke4duke-sbt-plugin
i.e. in
project/plugins/Plugins.scala
import sbt._ class Plugins(info: ProjectInfo) extends PluginDefinition(info) { val cuke4DukeSbtRepo = "cuke4duke sbt repo" at "http://repo.coderlukes.com" val cuke4duke = "cuke4duke" % "cuke4duke-sbt-plugin" % "0.3.0" }
-
In your project file, mixin the Cuke4Duke trait
i.e., in
project/build/Project.scala
import sbt._ import cuke4duke.sbt.Cuke4Duke class YourProject(info: ProjectInfo) extends DefaultProject(info) with Cuke4Duke { // .... }
-
Profit!
- Cucumber as a TestFramework
- Running a single feature