O'Reilly logo

Scala Test-Driven Development by Gaurav Sood

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Talk is cheap

We have talked enough about BDD. There is no alternative to getting our hands on the steering wheel. Let us look at setting up BDD scenarios in our example application using Cucumber.

We will need to introduce the Cucumber library dependencies that we will need to include in our SBT-build descriptor. Along with Cucumber, we will also need dependencies for JUnit. This is because I have always found it easier to integrate Cucumber with SBT using JUnit. There are some third-party SBT plugins that also allow for Cucumber and SBT integration, but since they are not maintained by LightBend (previously known as TypeSafe), they are not up-to-date with the latest Scala and SBT versions.

Adding Cucumber dependency

With the new library dependencies ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required