JUnit 5 released

5th version of Java module testing framework released 
11 September 2017   536

5th version of JUnit testing framework released. 

What is JUnit?

JUnit is a unti testing library for Java software.
Created by Kent Beck and Eric Gamma, JUnit belongs to the family of xUnit frameworks for various programming languages originating in the Kent Beck SUnit for Smalltalk. JUnit spawned an ecosystem of extensions - JMock, EasyMock, DbUnit, HttpUnit, and so on.

Functionality 

  • junit.framework.Assert
    • assertEquals
    • assertFalse
    • assertNotNull
    • assertNull
    • assertNotSame
    • assertSame
    • assertTrue
  • junit.framework.TestCase extends junit.framework.Assert
    • run
    • setUp
    • tearDown

What's new in JUnit 5?

Unlike previous versions of JUnit, JUnit 5 is composed of several different modules from three different sub-projects.

JUnit 5 = JUnit Platform + JUnit Jupiter + JUnit Vintage

The JUnit Platform serves as a foundation for launching testing frameworks on the JVM. It also defines the TestEngineAPI for developing a testing framework that runs on the platform. Furthermore, the platform provides a Console Launcher to launch the platform from the command line and build plugins for Gradle and Maven as well as a JUnit 4 based Runner for running any TestEngine on the platform.

JUnit Jupiter is the combination of the new programming model and extension model for writing tests and extensions in JUnit 5. The Jupiter sub-project provides a TestEngine for running Jupiter based tests on the platform.

JUnit Vintage provides a TestEngine for running JUnit 3 and JUnit 4 based tests on the platform.

All changes for all JUnit 5x versions available here

Visit official website for more information.

What is Web3j?

Small review of lightweight Java and Android library for integration with Ethereum clients
15 December 2017   836

What is webj3?

web3j is a lightweight, highly modular, reactive, type safe Java and Android library for working with Smart Contracts and integrating with clients (nodes) on the Ethereum network:

web3j architecture
Web3j Architecture

This allows you to work with the Ethereum blockchain, without the additional overhead of having to write your own integration code for the platform.

According to the developers, these are the features:

  • Complete implementation of Ethereum's JSON-RPC client API over HTTP and IPC
  • Ethereum wallet support
  • Auto-generation of Java smart contract wrappers to create, deploy, transact with and call smart contracts from native Java code (Solidity and Truffle definition formats supported)
  • Reactive-functional API for working with filters
  • Ethereum Name Service (ENS) support
  • Support for Parity's Personal, and Geth's Personal client APIs
  • Support for Infura, so you don't have to run an Ethereum client yourself
  • Comprehensive integration tests demonstrating a number of the above scenarios
  • Command line tools
  • Android compatible
  • Support for JP Morgan's Quorum via web3j-quorum

It has five runtime dependencies:

  • RxJava for its reactive-functional API
  • OKHttp for HTTP connections
  • Jackson Core for fast JSON serialisation/deserialisation
  • Bouncy Castle (Spongy Castle on Android) for crypto
  • Jnr-unixsocket for *nix IPC (not available on Android)

It also uses JavaPoet for generating smart contract wrappers.

Lear more at GitHub.