Search Results for: testkit

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 and easy start with REST APIs

Reading Time: 2 minutes What is Akka-Http? Akka-Http is a library for providing HTTP based services. We use it for building REST APIs(Low level or High level REST APIs). It is build on the top of Akka- actors and Streams.Contains following modules: Akka-http-core Akka-http Akka-Http-testkit akka-http-spray-jason akka-http-xml Common Abstractions used in Akka-HTTP Http-Request : Used to send a request to the server and it consist of a method(GET, POST Continue Reading

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

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

How to migrate Scala 2.13 project to Scala 3?

Reading Time: 9 minutes Are you a Scala developer looking to migrate your existing Scala 2.13 projects to the latest version of the language? If so, you’ll be happy to know that Scala 3 is now available and comes with a range of new features and improvements. With its streamlined syntax, improved performance, and better compatibility with Java 8 and above, Scala 3 offers a host of benefits for 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

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

How to develop Event Driven Application using ZIO Actors

Reading Time: 5 minutes What is ZIO : ZIO is a cutting-edge framework for creating cloud-native JVM applications. ZIO enables developers to construct best-practice applications that are extremely scalable, tested, robust, resilient, resource-safe, efficient, and observable thanks to its user-friendly yet strong functional core. Difference between Akka and ZIO : Akka and ZIO are both the libraries in Scala for building concurrent, scalable, and fault-tolerant applications. Akka is a 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

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

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

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

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