Archive

Archive for July, 2016

What Mr. Spock would possibly say about modern unit testing: pragmatic and emotional overview

July 15th, 2016 No comments

Yaroslav Yermilov, Senior Software Engineer @EPAM

In this article we will try to examine current state of the automated testing concept in the Java world. As a reference, we will go through basic and advanced spock-framework features and compare them with what JUnit4/JUnit5/TestNG/Hamcrest/AssertJ/Mockito/whatever can offer instead. We will try to understand Spock philosophy and find out both pragmatic and emotional answer to the questions: should I use spock-framework in the year of 2016? how to convince my manager that “yes, we should”? how to convince my teammates that “no, we shouldn’t”?

What’s About Modern Unit Testing?

To my mind, automated testing is one of the most powerful software development concept suggested so far. Read more …

Java 8: 10+ features

July 11th, 2016 No comments

Oleg Tsal-Tsalko, Lead Software Engineer @EPAM

If you are using Java 8, there is no excuse not to use all the great new language features this platform offers you. Simple switch to JRE 8 might give slight increase in performance of your application due to numerous continuous platform optimizations, however with Java 8 you can experience real boost in engineering productivity and code efficiency.

Use Stream API

Stream API – is not a data structure or a collection, it is an abstraction which allows building operations pipeline over sequence of data elements. By using Stream API, you can build a simple and logical chain of operations. A very important feature of Java 8 is that you can use internal parallelisms. For example, if you need to parallelize a particular operation, writing even the simplest code without using the parallel stream would be doomed to writing lots of code using directly ForkJoinPools, ExecutorServices, and other low level concurrency mechanisms. This used to make the process of writing a code more complicated. In addition, Stream API makes it more convenient to use functional programming in Java. Read more …

Tags: , ,