scalatest

woman using a computer

Zio Effects

Reading Time: 5 minutes What are Functional effects? Functional effects refer to the changes or modifications in the state of a program or system as a result of executing a specific function. These effects can include updating variables, creating or destroying objects, modifying data structures, or triggering external events such as sending messages or making HTTP requests. They are an important aspect of functional programming, as they allow developers Continue Reading

Scala Traits in Simple words

Reading Time: 2 minutes In this blog post, we will talk about traits in Scala. Then we will discuss how is a trait different from abstract classes. Scala Traits A trait is similar to a partial implementation of an interface. A trait in Scala can contain abstract and non-abstract methods. We can make a trait with all abstract methods or some abstract methods and some non-abstract methods. Variables declared Continue Reading

How to deal with Option data type in Scala

Reading Time: 3 minutes In this blog post, we will talk about Option data type in Scala. Then we will discuss some of the methods for dealing with options. Options In Scala, an Option is a carrier of a single or no element for a specified type. An Option[T] object can be either Some[T] or None object, which represents a value that is not present. Thus, options mainly come Continue Reading

Testing in Scala (Frameworks, Code Coverage, Mocking, Matchers, and ScalaTest)

Reading Time: 5 minutes We will be covering the below concepts in this blog: Why we need testing Test Libraries How to set up ScalaTest Different frameworks in ScalaTest and how to use them Mocking  Matchers Plugins for Code Coverage Why we need testing: Firstly, as a good software developers it is important to use testing that is good and has good coverage. Testing is an essential part of Continue Reading

Scoverage Analysis | Scala | SBT

Reading Time: 3 minutes Scoverage… what it is, how to use it and for which build tool it is available. So, In this blog we are gonna discussing all these along with its implementation in SBT. What is scoverage ? “scoverage” is an Apache’s free licensed code coverage tool for Scala language that put forward the statement and branch coverage. It is available for SBT, Maven, and Gradle. Advantage Continue Reading

Data-driven framework with selenium, Scala, and SBT

Reading Time: 4 minutes Hello everyone, in our last blog we saw that how we can execute ours test in headless mode and now in this blog we will see how we can achieve Data-driven framework with selenium, Scala, and SBT. Need for data-driven framework A data-Driven framework helps us in separating the test script logic and the test data from one another. It allows us to write test Continue Reading

Writing Unit Test for Apache Spark using Memory Streams

Reading Time: 2 minutes In this post, we are going to look into how we can leverage apache spark’s memory streams for Unit testing What is it ? Apache spark’s memory streams is a concrete streaming source of memory data source that supports reading in Micro-Batch Stream Processing. Lets jump into it We will be using a memory stream writing some test data in memory as a stream. We Continue Reading

Combining Gatling Reports

Reading Time: 4 minutes Hi guys, In this blog, we shall discuss about the report generation through Gatling and combining Gatling Reports. As you may already know, when we run a Gatling test the report gets generated automatically. However, you cannot compare the Gatling test report of two different tests in a single report unless you have the enterprise version of Gatling. I will try to explain an easy Continue Reading

Accessing private fields and methods using reflection

Reading Time: 3 minutes How to access private methods of a class.
You can do this by the help of reflections at runtime.

Table Driven Testing in Scala

Reading Time: 3 minutes As a software developer, I ensure to write unit tests for the code which I write (and at times the missing unit tests for the existing code). My aim has been to ensure to cover all the cases that arise out of the code written and therefore I face challenges in this too. Because of my endeavour to write a sufficiently strong test suite for Continue Reading

TDD: What & How?

Reading Time: 3 minutes Programming is like exploring a dark house. You go from room to room to room. Writing the test is like turning on the light. Then you can avoid the table, furniture and save your shins i.e resulting clean design from refactoring. Then you are ready to explore the next room. There is famous saying in software development that If it isn’t tested, it’s already broken. Continue Reading

monads

Back2Basics: Futures in Scala

Reading Time: 3 minutes Hey folks, in this blog we will be discussing and try to gather some knowledge on how multithreading, concurrency can be achieved and asynchronous computations can be done on immutable values by the use of Futures. Why do we need Futures? The concept of Futures was introduced to allow concurrent programming and avoid wastage of resources which will be blocked in case of sequential code. Continue Reading

Akka http with json4s

Reading Time: 2 minutes Akka Http uses the spray-json library for JSON support. But a few days back while working on a project which was using the json4s library for marshalling/unmarshalling, I got stuck during parsing of JSON request and extracting that parsed values into my target Scala data model.