Instancio is packaged as a multi-release JAR and can be used with Java 8 or higher.
1.5.0 supports creating
java.lang.Recordclasses on Java 16
sealedclasses on Java 17
There are three dependencies available from Maven central:
||JUnit Jupiter integration|
||Annotation processor for generating metamodels|
If you use JUnit Jupiter, then use
instancio-junit has a transitive dependency on
instancio-core, it is not necessary to import both.
instancio-junit would suffice.
If you use JUnit 4, TestNG, or would like to use Instancio standalone, then use
instancio-core itself has minimal
The annotation processor generates metamodels, which can be used to avoid referencing fields by their names. The annotation processor can be enabled as shown below. Please refer to the Metamodel section of the user guide for examples.