Releases: jtestkit/joot
Releases · jtestkit/joot
v0.10.0
What's New
- Factory definitions —
ctx.define(TABLE, f -> { ... })for reusable defaults, generators, and callbacks per table - Traits — named composable variations applied via
.trait("name")on builders - Sequences —
ctx.sequence(FIELD, n -> ...)for auto-incrementing values - Lifecycle callbacks —
beforeCreate/afterCreatehooks in definitions and traits - Batch creation —
.times(n)for creating multiple entities, with optional per-item customizer - Factory inheritance —
f.parent("base")for reusable base definitions with cycle detection - Build strategies —
buildWithoutInsert()andbuildAttributes()for non-persisted test data - Transient attributes —
.transientAttr("key", value)for passing non-persisted values to callbacks
Stats
- 148 integration tests (51 new), 100% pass rate
- Fully backward compatible with 0.9.0
Maven
<dependency>
<groupId>io.github.jtestkit</groupId>
<artifactId>joot</artifactId>
<version>0.10.0</version>
<scope>test</scope>
</dependency>Contributors
Thanks to @netsky-prod for the factory definitions PR (#1)!
v0.9.0 - Release Candidate
Joot 0.9.0 - Release Candidate 🚀
Lightweight testing library for jOOQ applications with automatic foreign key resolution.
🎯 Key Features
- Automatic FK Resolution - Creates parent entities automatically, handles cycles and self-references
- UNIQUE Constraints - Auto-increment values for unique fields
- Adaptive String Generation - Respects VARCHAR length constraints and field names
- Custom Value Generators - Field-specific and type-based generation
- Enum Support - Deterministic first value selection
- Type-Safe API - Built on jOOQ's type system
- Zero Boilerplate - Minimal code for maximum productivity
📦 Installation
Gradle (Kotlin DSL)
dependencies {
testImplementation("io.github.jtestkit:joot:0.9.0")
testImplementation("org.jooq:jooq:3.13.0") // or later
}
Gradle (Groovy)
dependencies {
testImplementation 'io.github.jtestkit:joot:0.9.0'
testImplementation 'org.jooq:jooq:3.13.0' // or later
}
Maven
io.github.jtestkit joot 0.9.0 test🧪 Quick Example
@Test
void testUserCreation() {
JootContext ctx = JootContext.create(dsl);
// Creates user WITH all required FKs automatically!
User user = ctx.create(USER, User.class).build();
assertThat(user.getId()).isNotNull();
assertThat(user.getTeamId()).isNotNull(); // FK created automatically
}
✅ Testing
- 97 integration tests (100% pass rate)
- PostgreSQL + Testcontainers
- Support for jOOQ 3.13+
📖 Documentation
Full documentation: README.md
🎓 Release Candidate Status
This is a Release Candidate for community feedback before v1.0.0. Please try it out and report any issues!
📝 License
MIT License - see LICENSE