Search Results for: testkit

KnolX Session: Testing Akka Actors Using TestKit

In the presentation which is the part of our ongoing Knolx session, we discussed about how to test Akka actors using Testkit. By using testkit we can test Actor’s behaviour, apply time assertions on actor’s reply and we can also do integration testing of actors. We also discussed how to use TestProbe to test actors which are supposed to send messages to different destinatations.   Continue Reading

Mocking Methods for Testing Akka Http Routes

Hey folks, in this blog I am going to explain how to write unit test cases for the routes in Akka Http. First and foremost the test cases should not hit our backend logic, remember that we are only testing our routes, routes basically form the controller layer in our application. They control the request/response cycle. They tell that which business logic should respond to Continue Reading

Lagom 1.4: What’s new?

Lagom is a reactive microservice framework, which is increasingly becoming the go-to solution for building a microservice-based architecture for industry-wide services. In case you still haven’t heard of it, this blog post will not only familiarize you with the idea behind Lagom but will also walk you through some history of Lagom since its 1.0 launch, what’s new in the latest stable release, and some Continue Reading

Testing in Lagom(Advanced Testing Scenarios)

What’s the problem?  Testcases in Lagom. So, You want to write better unit and integration test cases then You have got read this blog.  Alright, Let’s see what it takes to test your code in Lagom. In this blog I will be taking up different scenarios and try to explain How to write test cases for that particular scenario. Testing in Lagom Testing in Lagom Continue Reading

Handling HTTPS requests with Akka-HTTPS Server

Hi guys, In my last blogs I explained how one can create a self-signed certificate and KeyStore in PKCS12. You can go through the previous blog, as we’ll be needing certificate and keystore  for handling HTTPS requests. https://blog.knoldus.com/2016/10/18/create-a-self-signed-ssl-certificate-using-openssl/ https://blog.knoldus.com/2016/10/26/how-to-create-a-keystore-in-pkcs12-format/ Akka-HTTP provides both Server-Side and Client-Side HTTPS support. In this blog I’ll be covering the Server-Side HTTPS support. Let’s start with “why do we need server-side HTTPS support?” If we want the communication between the browser and Continue Reading

Testing Rejection Handling in Akka-Http

In my previous blog, I discussed how to handle rejections in Akka Http. You may find it here. We left it on terms to explain the testing of it later. Keeping the promise 😉 In this blog, we will learn how to be able to write the test cases for rejection handling in Akka-Http. We will be using Akka TestKit and Akka-Http TestKit. Dependencies are Continue Reading

Akka Persistence using MongoDB – Part I

Akka is a powerful actor based tool kit for Concurrency, Parallelism and Clustering. But for every concurrent applications, Akka actors are not fit because Futures are another alternative for performing Concurrency. Most of the developers follow simple rules for using Future and Actors is “Futures for Concurrency, Actors for State“. In concurrent applications most of the time we are facing race conditions and deadlocks. Because Continue Reading

Cassandra with Spark 2.0 : Building Rest API !

In this tutorial , we will be demonstrating how to make a REST service in Spark using Akka-http as a side-kick  😉  and Cassandra as the data store. We have seen the power of Spark earlier and when it is combined with Cassandra in a right way it becomes even more powerful. Earlier we have seen how to build Rest Api on Spark and Couchbase Continue Reading

Scala, Couchbase, Spark and Akka-http: A combinatory tutorial for starters

Couchbase and Apache Spark are best so far , for the in-memory computation. I am using akka-http because its new in the business. If you are not a big fan of akka-http and don’t think it is yet ready for production then you can take a look on this blog, which displays how to do the same task using Spray. If you are new to all Continue Reading

Upgrade your Spark REST Server with Akka HTTP & Spark 2.0

About an year ago, in one of our blog – Spark with Spray Starter Kit we explained about creating REST Services with Spark and Spray. But, from past one year there has not been much development on Spray which tells us that soon Spray will be out-of-phase. So, we decided to Upgrade our Spark REST Server with Akka HTTP and Spark 2.0. Akka HTTP is a suite of Continue Reading

Integrate JWT with Akka HTTP

In this article we will discuss about , how to implement  authentication or authorization in Akka HTTP routes using JWT . As we know Akka HTTP is full implementation of  server  and client side HTTP stack on top Akka actor and Akka stream . Now Let’s  we  talk about JWT. what is JWT ? JSON Web Token (JWT) is an open standard (RFC 7519) that defines Continue Reading

A basic application to handle multipart form data using akka-http with test cases in Scala

In my previous blogs, I have talked about file upload and its test cases using akka-http. Now, in this blog I am going to explain the handling of multi part form data in akka-http with the help of a basic application which contains the code and its test cases. So Let’s start with the dependencies for the application. You have to add the following dependencies Continue Reading

Knoldus Pune Careers - Hiring Freshers

Get a head start on your career at Knoldus. Join us!