This repository illustrates the UnitTestBot main features related to generating tests for Spring-based code.
Here you can find the source code examples with comments as well as the resulting UnitTestBot-generated tests.
For comparison, we also provide tests generated with Diffblue Cover, the UnitTestBot major competitor.
Source | Settings | Tests |
---|---|---|
IntComparator.max |
Symbolic execution Unit tests |
IntComparatorTests |
ArrayListVerifier.checkIfNotEmpty |
Symbolic execution Unit tests |
ArrayListVerifierTests |
CustomByteReader.readBytes |
Symbolic execution Unit tests |
CustomByteReaderTests |
Source | Settings | Tests |
---|---|---|
OrderService.isMajorityExpensive |
Symbolic execution Unit tests |
OrderServiceUnitTests |
OrderService.isNotEmpty |
Symbolic execution Unit tests |
OrderServiceUselessUnitTests |
OrderService.isNotEmpty |
Fuzzing Integration tests Spring Boot autoconfiguration |
OrderServiceIntegrationTests |
CalculatorService.calcSquareSum |
Symbolic execution Unit tests |
CalculatorServiceNoConfigurationTests |
CalculatorService.calcSquareSum |
Symbolic execution Unit tests Spring Boot autoconfiguration |
CalculatorServiceWithConfigurationTests |
OrderController.isMajorityExpensive |
Fuzzing Integration tests Spring Boot autoconfiguration |
OrderControllerTests |
Source | Settings | Tests |
---|---|---|
MutableService |
Symbolic execution Unit tests |
MutableServiceTests |