A JUnit 5 extension for automatic test data generation in Java and Kotlin, eliminating manual setup for parameterized tests.
AutoParams is a JUnit 5 extension that automatically generates test data for parameterized tests in Java and Kotlin. It eliminates the manual creation of test values, reducing boilerplate and allowing developers to focus on test logic. The tool supports advanced features like value freezing, customization, and integrations with popular frameworks like Spring and Mockito.
Java and Kotlin developers writing unit and integration tests, particularly those using JUnit 5 for parameterized testing or working in Spring-based applications.
AutoParams saves time by automating test data generation, reduces repetitive code, and enhances test coverage with randomized inputs. Its extensible design and framework integrations make it a versatile choice for modern Java/Kotlin testing workflows.
AutoParams is a versatile test data generator designed for parameterized tests in Java and Kotlin.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Eliminates boilerplate by auto-populating JUnit 5 test parameters with randomized data using @AutoParams annotation, making tests concise and focused, as shown in the Calculator example.
Supports custom object generators, DSL for one-time customizations, and annotations like @Min/@Max for precise control, enabling enforcement of business rules like in ProductGenerator.
Offers extensions for Spring, Mockito, Lombok, and Kotlin, allowing seamless use in diverse ecosystems, such as injecting Spring beans with @UseBeans.
Provides @Freeze and @FreezeBy annotations with matching strategies to ensure shared references in generated objects, simplifying tests with dependencies like Product and Review.
Advanced features like DSL customizations require enabling parameter names at compile time (-parameters flag) or using @ConstructorProperties, adding setup overhead and potential friction.
The plethora of annotations (@AutoParams, @Freeze, @Customization, etc.) can be overwhelming, requiring significant time to master and increasing cognitive load for developers.
AutoParams is exclusively designed for JUnit 5, making it incompatible with other testing frameworks and limiting adoption in mixed or legacy environments.
AutoParams is an open-source alternative to the following products: