Tech blog of j-labs' engineers. Experiences, knowledge, solutions.

How to use monads in Java

Java is not a functional programming language. Despite the fact that Java 8 came with some elements from functional world, there is still no way to write fully functional code in Java. One of the key aspect of functional programming is using monad. I am not going to describe what are monads but I will describe some of them and respond to the title question.

Przemysław Sobierajski

|

21 Aug 2019

  Java 

Read more
3

How to use monads in Java

21 Aug 2019 | Przemysław Sobierajski

  Java 

Java is not a functional programming language. Despite the fact that Java 8 came with some elements from functional world, there is still no way to write fully functional code in Java. One of the key aspect of functional programming is using monad. I am not going to describe what are monads but I will describe some of them and respond to the title question.

Read more
4

Advanced mocking with Mockito

14 Aug 2019 | Tomasz Głuszak

  Java Mockito 

Purpose of unit tests is to test small chunks of code independently, in separation from any dependencies. In many cases to keep this kind of separation tools like Mockito come in handy. Mockito is mocking framework, Java library that allow to simulate calls on dependent objects instead of calling the real ones. A mock object returns a dummy data corresponding to dummy input passed to it.

Read more
5

Dealing with Java Exceptions in a functional way

24 Jul 2019 | Przemysław Sobierajski

  Java 

You may have heard that checked exceptions in Java are evil. Some people even say that they are Java’s biggest mistake. There is a lot of languages like Scala, Kotlin, C# or C++ which don’t have checked exceptions at all. Unchecked exceptions are generally better choice. Undoubtedly, you are able to write your code without creating new checked exceptions. However, you have to deal with them constantly, because a lot of standard or popular libraries abuse them. In result, your Java code is full of ugly throw catch clauses. They interfere with a regular application control flow.

Read more
6

Blocking vs non-blocking http servers performance

03 Jul 2019 | Przemysław Sobierajski

  Java 

In this article, I’d like to take a look at the performance and the scalability of both blocking and non-blocking HTTP servers. I’ll compare average response time for multiple REST requests sent to simple endpoints built with Spring Boot and Ratpack.

Read more
7

Test your REST API with Spock - Introduction to Spock Framework

29 May 2019 | Dominik Stolarski

In this article I'd like to show you how to test your API with Spock Framework. Spock is a testing framework for Java and Groovy applications. It extends JUnit runner and let us write shorter and more readable code. Spock supports unit testing, BDD and Mocking. It is also great for Data Driven Testing.

Read more
8

Introduction to performance tests using JMeter

27 Feb 2019 | Dominik Stolarski

JMeter is an open-source JAVA-based load testing tool for measuring and analyzing performance of services and applications. It simulates user behavior by sending requests to server. It can be used for testing variety of protocols and services like HTTP, HTTPS, SOAP / REST Webservices, FTP, JDBC, LDAP, SMTP, POP3, IMAP and many others.

Read more
9

Parametrized tests - solutions overview (TestNG, JUnit4, JUnit5)

07 Nov 2018 | Paweł Ćwik

Parametrized tests are a lot easier to maintain. Usually when single requirement changes it’s enough to change one variable in the code. You don’t have to read the whole implementation of the test (If you know what your variable means).

Read more
10

Building Selenium framework in java (part IV) - answer job interview questions like a pro

19 Sep 2018 | Bartek Drzewiński

In my opinion, Software Developer in Test job interviews are one of the most demanding interviews in IT market. How come?

Read more
11

JUnit 5: Preview of new possibilities

05 Sep 2018 | Przemysław Sobierajski

JUnit 5 comes with a bunch of new features. In this article I will briefly describe most of them.

Read more
12

Building Selenium framework in java (part III) - how do you fit Cucumber in there

22 Aug 2018 | Bartek Drzewiński

In this article let me explain how I think Cucumber fits Selenium based test framework written in java

Read more
13

Heroku: add-ons, logs and monitoring

08 Aug 2018 | Paweł Ćwik

  Java Cloud Databases 

In a previous article I’ve introduced you Heroku basics and deployed spring-boot-based application there. In the second part I will show you how to add database support and get a little bit into logs and metrics.

Read more
14

Cloud Computing with Amazon Web Services

25 Jul 2018 | Wojciech Józefek

  Java Cloud 

Nowadays cloud computing is really common depending on the services that we would like to use, from frequently utilized software applications to development environments, virtual machines and storage.

Read more
15

Deploying spring boot application on Heroku cloud platform

18 Jul 2018 | Paweł Ćwik

  Java Cloud 

Heroku is a cloud-based application platform and in this two-part article I will show you how, step by step, deploy Spring Boot application there.

Read more
16

Building Selenium framework in java (part II) - do it right for the first time

11 Jul 2018 | Bartek Drzewiński

In this article I would like to share with you how I build new end to end testing solutions for web projects. I’ll try to explain how well thought test framework architecture can improve test code quality.

Read more
17

JUnit 5: Quick start guide

04 Jul 2018 | Przemysław Sobierajski

JUnit 5 enables many different styles of testing and focuses on Java 8 and above. In this article I will show you how to start with new version of JUnit.

Read more
18

Building Selenium framework in java (part I) - what should you know before you start

27 Jun 2018 | Bartek Drzewiński

Nowadays test automation is an integral part of software development process. I decided to create series of blog entries, which will describe how to create customized Selenium test framework in java from scratch to make it fully functional, easy to use and maintain.

Read more
19

The Microservices Architecture

06 Jun 2018 | Wojciech Józefek

The microservices architecture is definitely one of such trendy solutions that is widely considered, especially in new projects. Is it worth trying and what kind of advantages and drawbacks does it have? Let’s see.

Read more
20

Popular EIP Frameworks comparison

11 Jan 2018 | Paweł Weselak

Enterprise Integration Patterns solves problems of enterprise application integration and message-oriented middleware. The aim of this article is to show the two EIP frameworks: Apache Camel and Spring Integration from the perspective of a developer who knows EIP patterns quite well but do not have very long experience with using these frameworks.

Read more
21

Spring Boot and Angular 2 #1

25 May 2017 | Grzegorz Pałubiak

  Front-end Java 

In this article I would like to show you how to create simple application with Spring Boot on server side and Angular 2 at a front-end. It is very good combination, proper for many types of projects.

Read more
22

Spock vs Junit with Mockito

18 Apr 2017 | Wojciech Maziarz

Spock and JUnit are frameworks for unit testing of Java applications. Mockito is a well – known and stable library of mocking extensions for JUnit to write tests in Java language.

Read more
23

JSQL - easy way to test & maintain your SQL in Java

10 Apr 2017 | Michał Mytnik

  Java Databases 

JSQL Parser is open source library developed under dual license: LGPL V2.1 and Apache Software License. Main responsibility of the framework is parsing of SQL statements.

Read more
24

Given-When-Then pattern in unit tests

03 Apr 2017 | Mateusz Starzyk

We can say that it is a style/template how we can describe some functionality (system behavior) in more readable and natural for human way.

Read more