Xtest

A unit testing domain-specific language for Java.

Download (v0.2.1) Documentation

What is Xtest?

Features

Example of a nested test case and test case in for loop

Simple, flexible syntax

Xtest has a simple Java-like syntax that removes unneccessary boilerplate and adds expressions that make unit testing concepts part of the language.

Example of Eclipse tooltip with failed assertion details

IDE integration

The Xtext framework provides full Eclipse IDE integration for Xtest including syntax highlighting and auto-complete so that using Xtest feels no different than Java.

Eclipse package explorer showing passing and failing xtest file

Automatic test execution

Xtest files sit in your Eclipse workspace in a passing or failing state and are only run when a dependency so you are immediately notified of failures.

Example using map-reduce Xbase extension methods in an Xtest method

Xbase goodies

Xtest is based on Xbase which provide Java integration and some nice additions like type inference, overloaded operators, and lambda expressions to name a few.

JUnit runner invoking an Xtest file

JUnit integration

Xtest scripts be linked into existing JUnit test suites and can also invoke existing JUnit test suites to be used to alert you when they are failing.

Eclipse displaying autocomplete suggestions for private and protected members of a Java class

Private member access

Xtest grants access to private members of Java classes. Think of a probe for testing and tweaking voltages at internal nodes of a circuit board - that is what Xtest allows for Java code without changing its API.