Unit Testing

Businessman playing digital tablet in cafe

How to write unit test in Scala ZIO

Reading Time: 3 minutes ZIO is a Scala library for creating asynchronous, concurrent, and fault-tolerant applications. It is based on the concept of “effects” and provides a powerful and flexible way to express and compose computations that may have side effects, such as reading from a file, writing to a database, or making an HTTP request. ZIO offers a full-featured ecosystem for building applications, including libraries for common tasks Continue Reading

How To Perform UNIT TESTING using Mockito Framework :-

Reading Time: 4 minutes While working on a code we intend to make it functional. But it is equally important that we make sure our code works the way we intended it to. And we can achieve that by witting unit test cases. In this blog, we will cover the same by considering two testing scenarios. First, where the method is independent. Second, where it is dependent on some Continue Reading

How to do Unit testing using embedded PostgreSQL in Akka

Reading Time: 2 minutes Embedded PostgreSQL provides a platform neutral way for running PostgreSQL binary in unit tests. It is an efficient database to write test cases as it supports all data types of PostgreSQL. In this blog I will not dive deep in the features of Embedded PostgreSQL but rather focus on it’s integration with an Akka application. I have added a sample project for the better understanding. Continue Reading

Test Cases in Rust are simple to write

Reading Time: 4 minutes Rust has been the most loved programming language for the last five years in a row. Rust is a low-level statically-typed multi-paradigm programming language that’s focused on safety and performance. Rust solves problems that C/C++ has been struggling with for a long time, such as memory errors and building concurrent programs. Due to the borrow checker, Rust can prevent data races at compile-time. Data races occur when Continue Reading

Unit testing with Mockito Framework

Reading Time: 3 minutes In this blog, we are going to learn about how we can use mockito framework to perform unit testing. Mockito framework provides us several methods which we can use to perform unit test. What is Unit Testing Unit testing is a software testing technique in which we only test a single component of the software. We ignore the output of the dependent module and test Continue Reading

ANOTHER LOOK INTO UNIT TESTING AND INTEGRATION TESTING

Reading Time: 3 minutes Software testing is the process of verifying and validating , the developed software that works according to expectations or not. We already know that no code is perfect and completely bug-free. Also, in this fast-changing era every now and then various features are added which only increases the chances of getting bugs. Hence, the code is changed and improvised regularly to minimise the bugs, add Continue Reading

Unit testing void methods with Mockito and JUnit

Reading Time: 3 minutes Writing functionality is the main focus whenever we are writing a software program, but it is equally important that we make sure our code works the way we intended it to. And how do we do that? By writing unit test cases. They are used to test the smallest functionality of code. Unit test cases are an essential part of software development. In this blog, Continue Reading

Introduction to Spock: A Unit Testing Framework

Reading Time: 4 minutes This article talks about the Spock framework. It’s a framework for writing unit test cases in BDD style.

Basic Introduction to Unit Testing in Angular

Reading Time: 6 minutes What is Unit Testing? Unit testing is testing a unit in an isolated environment. A unit can be a class, component, service, directive module, etc. which can be logically separated from the software. Any unit in an app is not isolated, it’s quite normal that it will be depending on the other units in an application for resources like data or methods. So if we Continue Reading

Mocking The Right Way

Reading Time: 3 minutes Mockito is a fun way to perform unit tests, but it’s true potential can only be realised if the underlying layers are designed in such a way that there is no interaction with the internal logic of other components of the application.

Writing Independent Tests

Reading Time: 2 minutes What does it mean for a test to be independent? It means that a test should not depend upon the presence or absence of other tests, the order of the tests, or whether or not previous tests failed or not. It also means that the tests should not be dependent upon external things such environment variables, an internet connection, or the local time. Why is Continue Reading

Loggers in Rust

Different ways to write unit test-cases in Rust

Reading Time: 2 minutes As a developer, we know that how important is to write unit test-cases in programming life. Unit Tests allows you to make big changes to code quickly. The main goal of unit testing is to segregate each part of the program and test that the individual parts are working correctly. Failure in a unit test shows without a doubt which part of the code doesn’t Continue Reading

Lagom Message Broker API Testing

Reading Time: 3 minutes Many of us have been working with Lagom, so I will skip telling about Lagom. Let’s just quickly go through the  important APIs that Lagom provides: Service API Message Broker API Pesistence API In this blog, we will see how we can test the Message Broker API provided by Lagom. But before doing that let’s just briefly see what this API provides! Lagom’s Message Broker Continue Reading