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.
We don’t yet support Gradle. If you’d like to work on this, let us know on the issue.
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());
}
}
Check out the tutorial to learn how to write tests.