Articles Tagged ‘generator’

Generating JUnit Tests with Java, EvoSuite and Maven

Sunday, February 28th, 2016

Generating test suites for existing code allows us to verify the behaviour of an application before we’re making changes to its code base or for regression testing.

In the following short tutorial I’d like to demonstrate how to derive test suites from an existing Java application using EvoSuite and the EvoSuite Maven plug-in.

EvoSuite offers some nice features like running in a sandbox to avoid dangerous operations, virtual file-system and network and optimizing of different coverage criteria.


Generating Java Source Files with JavaPoet

Saturday, February 28th, 2015

For the most of us developers, generating Java source files is an occasionally happening task and we’re dealing with it e.g. when writing annotation processors, writing tools or interacting with meta-data files.

JavaPoet is a nice library to simplify such tasks, offering an intuitive fluent-builder API to generate source files in no time.

In the following tutorial I’d like to share a few examples by writing code generators with the help of this library.


Using jOOQ and Build Helper Plugin to Generate Database Metamodels with Maven

Tuesday, June 10th, 2014

When you need to derive meta-models from existing databases and want to create type-safe queries with an elegant, fluent-API, jOOQ definitely is a tool to consider here.

In the following tutorial I’d like to demonstrate how to integrate the jOOQ meta-model generator into a Maven build using the jOOQ Maven Plug-in, the Build Helper Maven Plug-in and Maven profiles to finally create a running application to query an existing RDBMS using such a generated meta-model.


Playing around with QR Codes

Tuesday, May 11th, 2010

Sometimes QR codes are a nice way to distribute information like calendar events, contact information, e-mail, geo-locations or internet addresses.

In the following article we’re going to encode information to QR code images using the ZXing library and afterwards decode information from a given QR code.

Finally we’re taking a look on online QR code generators and how to integrate the ZXing library in a Maven project.