Skip to content

Cuppa - A testing framework for Java 8+


Apache-2.0, CC-BY-4.0 licenses found

Licenses found

Notifications You must be signed in to change notification settings


Cuppa is a testing framework for Java 8. It makes writing tests productive and fun.

  • Be descriptive: Use strings – not identifiers – to clearly describe the behaviour you are testing. Test reports produced by Cuppa read like good documentation.
  • Group tests together: Create structure in your test files to reduce repetition and improve readability. Groups of tests can share setup and teardown steps.
  • Define tests at runtime: Cuppa makes it trivial to write parameterised tests. It's as simple as a for loop. Cuppa is also easy to extend - there's no need to write annotations.


public class ListTest {
        describe("List", () -> {
            describe("#indexOf", () -> {
                it("returns -1 when the value is not present", () -> {
                    List<Integer> list = Arrays.asList(1, 2, 3);

Check out the website for more examples.

Getting Started

For full details see the getting started guide on the website.


Add a test dependency for Cuppa in your project's POM:


See the Maven integration guide for details on how to get Maven to run the tests automatically.

Plain Old Jar File

Alternatively, you can download binaries for the latest release.

To run your Cuppa tests, use the Cuppa API:

public class EntryPoint {
    public static void main(String[] args) {
        Runner runner = new Runner();
        TestBlock rootBlock = runner.defineTests(Collections.singletonList(MyTestClass.class));, new DefaultReporter());



You'll need JDK 8 installed and available on the path.


Cuppa is built using Gradle:

$ cd cuppa
$ ./gradlew build

Run ./gradlew tasks to see a list of all available tasks.


Cuppa is licensed under an Apache 2.0 license. The documentation is licensed under a Creative Commons license.

Cuppa is inspired by the wonderful Mocha, a testing framework for JavaScript.