Cuppa
Cuppa - A testing framework for Java 8+
Install / Use
/learn @cuppa-framework/CuppaREADME
Cuppa

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 <code>for</code> loop. Cuppa is also easy to extend - there's no need to write annotations.
Example
@Test
public class ListTest {
{
describe("List", () -> {
describe("#indexOf", () -> {
it("returns -1 when the value is not present", () -> {
List<Integer> list = Arrays.asList(1, 2, 3);
assertThat(list.indexOf(5)).isEqualTo(-1);
});
});
});
}
}
Check out the website for more examples.
Getting Started
For full details see the getting started guide on the website.
Maven
Add a test dependency for Cuppa in your project's POM:
<dependency>
<groupId>org.forgerock.cuppa</groupId>
<artifactId>cuppa</artifactId>
<version>1.4.0</version>
<scope>test</scope>
</dependency>
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));
runner.run(rootBlock, new DefaultReporter());
}
}
Contribute
Prerequisites
You'll need JDK 8 installed and available on the path.
Building
Cuppa is built using Gradle:
$ cd cuppa
$ ./gradlew build
Run ./gradlew tasks to see a list of all available tasks.
License
Cuppa is licensed under an Apache 2.0 license. The documentation is licensed under a Creative Commons license.
Cuppa is inspired by the wonderful <a href="https://mochajs.org">Mocha</a>, a testing framework for JavaScript.
Related Skills
gh-issues
346.4kFetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
node-connect
346.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Writing Hookify Rules
107.2kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
