Instruction file imported from harezmi/fit4j (
.cursor/rules/fit4j-project.mdc). Copyright stays with the author.
FIT4J (this repo)
FIT4J — Spring Boot test library for JVM (Kotlin/Java): full ApplicationContext; mock external gRPC/REST/third parties; infrastructure via embedded services and Testcontainers (Kafka, DBs, Redis, Elasticsearch, etc.).
Docs
README.md— user guide: setup,@FIT/@IT, fixtures, Kafka verification, Testcontainers, properties, no parallel tests.index.html— Fit4j Wiki (sidebar sections: architecture, Spring context integration, HTTP/gRPC/Kafka, Testcontainers, config). Design companion; not shipped in the JAR.fit4j-examples/— runnable samples (fit4j-examples/README.md).
Build
Java 17 bytecode (javaBytecodeVersion), built and tested with JDK 25 toolchain (javaToolchainVersion), Kotlin 2.3.21, Spring Boot 4.1.x from gradle.properties. Coordinates: io.github.harezmi:fit4j:0.1.0+ (Boot 4.1 line).
Test annotations
@IT—@SpringBootTest(defaultMOCK),testprofile,fit4j.testClass.isIntegrationTest=true.@FIT— on@IT:fit4j.testClass.isFunctionalIntegrationTest=true,Fit4JTestExtension, default random port, YAML fixtures. FIT-only beans:@EnableOnFIT.
JUnit parallel mode remains discouraged; mock HTTP/gRPC threads resolve the active test via execution id (X-Fit4j-Test-Execution-Id / gRPC metadata x-fit4j-test-execution-id) and Fit4jTestExecutionRegistry. Shared resources (e.g. some embedded Kafka setups) may still conflict across concurrent tests.
Packages (org.fit4j)
autoconfigure/ (entries in META-INF/spring/...AutoConfiguration.imports), context/ (extension + context customizers), kafka/, grpc/, http/, mock/declarative/, testcontainers/, helper/, dbcleanup/, scope/. Extend the owning package for new features.
Proto codegen: test source set in build.gradle.kts. Tests: src/test/kotlin/org/fit4j/.