Blending Cucumber, Cassandra and Akka-Http


Folks,

Knoldus has always pioneered the deep diving into the best ways to use cutting edge technologies. In the past few days, one of our team carried this deed by integrating Cucumber with Akka-Http, Cassandra and of course, Scala. In this blog, we reach out to you to explain and show how this can be done.

Cucumber

Cucumber is for Behavior Driven Design (BDD). The approach of Cucumber is to write the behavior of the application and then run them for acceptance testing.

Akka-Http

Akka-Http is a general toolkit provided by Akka to implement HTTP services. It supports both client and server side services.

Cassandra

Cassandra is a database that provides high scalability and availability with best performance.

All these three have been integrated with Scala in this endeavor. We have used a plugin available here that integrates Cucumber with Sbt. Through this we will be able to execute our test cases using both the commands – sbt cucumber and sbt test.

You may find the entire code of the application here.

It is important to notice the  build.sbt of this project. We have tried to use all the latest dependencies. Then there is line

CucumberPlugin.glue := "allTest"

This line tells the Cucumber where to find its steps files. In this case, all are in the allTest package. All the Cucumber feature files are in the resource package.

If you perform sbt cucumber all the test cases will be executed. Then there is line

testFrameworks += new TestFramework("allTest.runner")

This will enable all the test cases of cucumber to run through command sbt test.

The rest of the code is pretty simple and you should go through it. You may clone the project and test it on your local machines. We are open for questions and suggestions. Reach out to us.

Happy Blogging !


KNOLDUS-advt-sticker

Advertisements
This entry was posted in Akka, akka-http, Cassandra, Cucumber, database, knoldus, sbt, Scala, scalatest, Test, testing, tests and tagged . Bookmark the permalink.

6 Responses to Blending Cucumber, Cassandra and Akka-Http

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s