Writing tests means creating test data — lots of it. Constructing data classes, populating fields with dummy values, and keeping dependencies consistent is tedious and error-prone. As your model grows, so does the boilerplate.
// Without Some
val user = User(
name = "John", age = 30,
email = "john@example.com",
address = Address(street = "123 Main St", city = "Springfield", zipCode = "12345"),
orders = listOf(Order(id = "ord-1", amount = 99.99), Order(id = "ord-2", amount = 49.50))
)
// With Some
val user = some<User>()Some eliminates boilerplate by generating fully populated instances of any Kotlin class with a single function call.
- Zero configuration —
some<T>()generates a complete instance right out of the box. No builders, no factories, no setup. - Universal type support — Works with data classes, sealed classes/interfaces, object singletons, value classes, generics, and all standard collections. If Kotlin can represent it, Some can generate it.
- Nested and recursive structures — Handles deeply nested data classes, circular references, and recursive sealed class hierarchies without infinite loops.
- Fine-grained control — Override how specific fields are generated: control nullable probability, string format, collection sizes, register custom type factories for types, or use property factories for individual fields.
- Extensible — Ship custom
ResolverProviderimplementations discovered viaServiceLoaderto add support for domain-specific, third-party, or internal application types — with custom strategies and no consumer configuration required. - Deterministic by choice — Set a seed for reproducible test data across runs, or default to random for variation.
Some is published as three artifacts:
some-corefor Java and Kotlin/JVM projectssome-androidfor Android projects. It re-exports the core API, so you do not need to addsome-coreseparately.some-kotestfor KotestArbintegration. Add it alongside eithersome-coreorsome-android.
dependencies {
// Kotlin/JVM or Java tests
testImplementation("dev.appoutlet:some-core:{version}")
// Android tests. Includes the shared Some API, so do not also add some-core.
testImplementation("dev.appoutlet:some-android:{version}")
// Optional: Kotest property testing integration.
// Add this alongside either some-core or some-android.
testImplementation("dev.appoutlet:some-kotest:{version}")
}📖 Read the full documentation at some.appoutlet.dev for installation, configuration, and advanced usage.
If you are upgrading from 0.2.1, start with the 0.2.1 to 0.2.2 migration notes.
Interested in helping improve Some? Contributions are welcome. Please read the contributing guide to learn how to set up the project, run the checks, and prepare a good contribution.
Some is open source and available under the Apache 2.0 License.
A Project by AppOutlet
Some is developed and maintained by AppOutlet.
You can explore our other projects on our website.