Skip to main content

AutoParams is a test data generator in Java and Kotlin.

Enhance your TDD experience!

Easy to Use

With AutoParams, writing tests is easier than ever. Simply add the @AutoParams annotation to your test method, and the parameters will be automatically populated with generated values.

Focus on What Matters

Using AutoParams allows you to skip the repetitive work of constructing test data. The required test data is automatically generated, so you can focus on what really matters: your domain-specific requirements.

Enhanced Coverage

By using random values ​​instead of static data, AutoParams allows your tests to cover a wider range of cases. Each test iteration validates your application under a variety of conditions, uncovering edge cases that might not be noticed with fixed values.

A Simple Example

The automatic generation of test data by AutoParams can potentially eliminate the need for triangulation in tests, streamlining the testing process.

@Test
@AutoParams
void testMethod(int a, int b) {
var sut = new Calculator();
int actual = sut.add(a, b);
assertEquals(a + b, actual);
}