Template Driven Test POJO Generation with Fixture Factory and Java

In our tests we often need to create a bunch of test-objects that are populated with random-data. This data needs to follow specific rules as identifiers need to be unique or must be incremented, string-properties must follow special conventions and so on. In the following short tutorial I will demonstrate how to generate such test data using the Fixture Factory library. Figure 1. Fixture Factory and JUnit...

June 20, 2017 · 8 min · 1689 words · Micha Kops

Creating a Blueprint or Content-Creator Plugin for Confluence

Blueprint is a new API in Confluence 5 that allows developers to create new content elements and to hook into the Confluence “create” dialogue – not to be confused with OSGi blueprints, the CSS blueprint framework or Tinkerpop Blueprints here. Content may be added using simple XHTML templates, dynamic templates enriched with data from context providers or even customized JavaScript dialogues. Another feature is, that pages of a specific blueprint type may be aggregated in a collector view that displays all pages created with the specific blueprint ...

March 17, 2013 · 5 min · 922 words · Micha Kops

Eclipse Snippets

Favorites Spare my time when using static imports .. Window > Preferences > Java > Editor > Content Assist > Favorites: com.google.common.collect.Lists com.jayway.restassured.matcher.RestAssuredMatchers com.jayway.restassured.RestAssured io.restassured.matcher.RestAssuredMatchers io.restassured.RestAssured org.hamcrest.MatcherAssert org.hamcrest.Matchers org.mockito.Mockito javaslang.API javaslang.Predicates Template to insert a static logger instance Go Windows > Preferences > Java > Editor > Templates > New … Enter logger as name and as template: ${:import(org.slf4j.Logger,org.slf4j.LoggerFactory)} private static final Logger LOG = LoggerFactory.getLogger(${enclosing_type}.class); Afterwards you’re able to type logger in your code and ctrl+space gives the option to insert the logger ...

March 1, 2010 · 1 min · 101 words · Micha Kops

Helm Snippets

Common operations Add Helm Repository helm repo add NAME URL e.g. for the Bitnami repository: helm repo add bitnami https://charts.bitnami.com/bitnami 1 ↵ "bitnami" has been added to your repositories List Repositories helm repo list 130 ↵ NAME URL bitnami https://charts.bitnami.com/bitnami Searching in a Helm Repository helm search repo wordpress NAME CHART VERSION APP VERSION DESCRIPTION bitnami/wordpress 15.2.30 6.1.1 WordPress is the world's most popular blogging ... bitnami/wordpress-intel 2.1.31 6.1.1 DEPRECATED WordPress for Intel is the most popu... ...

March 1, 2010 · 4 min · 697 words · Micha Kops

Linux Snippets

These are not only linux snippets but also bash snippets and snippets using tools that run under Linux, *nix or sometimes even MacOSX, I should reorder this article someday ;) Settings for more reliable bash scripts set -euo pipefail this gives us …​ -e: exit script if a single command fails -u: exit script if an unset variable is used -o pipefail: return value of a pipeline is the status of the last command to exit with a non-zero status, or zero if no command exited with a non-zero status ...

March 1, 2010 · 15 min · 3006 words · Micha Kops