Search Results for: testkit

Understanding Testing of Akka Actors

Reading Time: 2 minutes We may sometimes say the testing situation in Akka is a little confusing. In this blog you’ll learn about how the actors are tested in Akka. In Akka generally we have two kinds of tests, synchronous and asynchronous which some people term as ‘unit‘ and ‘integration‘ tests. ‘Unit tests‘ are synchronous, you directly test the receive method without requiring an actor system, etc. ‘Integration tests‘ Continue Reading

Synchronous Testing In Akka ToolKit | Testing Classic Akka Actors

Reading Time: 3 minutes Akka, a free open source toolkit simplifying the construction of concurrent and distributed systems/applications. In this blog, we are gonna discuss Testing the Akka Actors Synchronously. Usually, we people say that testing the Akka Actors is a bit confusing and tricky too, but it isn’t. Coming to the types of testing in Akka Toolkit, we have two types of testing i.e. Synchronous Testing and Asynchronous Continue Reading

Akka HTTP Route Testing

Reading Time: 2 minutes Akka HTTP puts a lot of focus on testability of code. It has a dedicated module akka-http-testkit for testing rest api’s. When you use this testkit you are not need to run external web server or application server to test your rest API’s. It will do all needed the stubbing and mocking for you which greatly simplifies the testing process. Adding dependency You need to add akka-http-testkit Continue Reading

Introduction to Akka Actors and Child Actors

Reading Time: 3 minutes Introduction In this blog, I will be explaining the basics of Akka, actors, and the way they are created. Therefore, I am naming this blog “Introduction to Akka Actors and Child Actors”. So let’s start with Akka first. What is Akka? Akka is not a framework but a toolkit and we use Akka for building distributed, highly concurrent, and fault-tolerant applications on the JVM, therefore Continue Reading

Testing for Rejection handling in Akka HTTP Routes

Reading Time: 2 minutes We will learn how we able to testing for rejection handling in Akka-Http.We will be using Akka TestKit and Akka-Http TestKit.Dependencies are as follows: Suppose we have a rejection builder and a route A regular test case for this route would look like But what if we want to test when the parameters are missing? That test case will be Because we are passing no Continue Reading

Akka Actors: Introduction and its Functionality

Reading Time: 3 minutes Here in this blog i am going to explain what is an Akka Actor and how we actually work with Akka Actors. What is Akka Akka is a toolkit for building highly concurrent, distributed and resilient message- driven application for Scala and java. Akka support several programming models for concurrency. it is very useful for writing server – side scalable applications. Using Akka it is Continue Reading

Introduction of Akka Actor and Its Advantages:

Reading Time: 5 minutes Here in this blog, I am going to explain what is Akka Actor is and how to implement Akka Actor in your project. What is Akka Akka is a free and open-source toolkit and runtime that simplifies the creation of concurrent and distributed applications on the JVM. Akka supports several programming models for concurrency. it emphasizes actor-based concurrency. It is very useful for writing server-side Continue Reading

Testing Rejection Handling in Akka-Http

Reading Time: 2 minutes 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

Lagom 1.4: What’s new?

Reading Time: 7 minutes 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

Handling HTTPS requests with Akka-HTTPS Server

Reading Time: 2 minutes 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 in Lagom(Advanced Testing Scenarios)

Reading Time: 7 minutes 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

Test cases for file upload using akka-http in Scala

Reading Time: < 1 minute Hello folks, In my previous blog, i explained how to upload a file using akka-http in Scala. Later, i got the queries about the test cases for the same. Therefore, in this blog I am going to explain the way of writing test cases for file upload. First we need to add test dependency : “com.typesafe.akka” %% “akka-http-testkit” % “2.4.3”, “org.scalatest” %% “scalatest” % “2.2.6” % Continue Reading

Upgrade your Spark REST Server with Akka HTTP & Spark 2.0

Reading Time: 2 minutes 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