View Code? Open in Web Editor
NEW
This project forked from bmuschko/junit5-vs-spock-feature-comparison
Compares JUnit 5 with Spock features by example.
Home Page: http://bmuschko.com/blog/junit5-vs-spock-showdown/
Java 58.91%
Groovy 41.09%
junit5-vs-spock-feature-comparison's Introduction
JUnit 5 vs. Spock feature comparison
Description |
JUnit 5 |
Spock |
Test execution |
@Test
|
Specification
|
Fixture set up and tear down |
@BeforeEach , @AfterEach
|
setup , teardown
|
Descriptive test names |
@DisplayName
|
Method name as String |
Disabling tests |
@Disabled
|
@Ignore
|
Expecting thrown exceptions |
assertThrows
|
@FailsWith
|
Repeating test execution |
@RepeatedTest
|
where statement with counter
|
Declaring timeouts |
assertTimeout
|
@Timeout
|
Conditional test execution |
assumeTrue , ExecutionCondition
|
@Requires
|
Data-driven tests |
@ParameterizedTest , @MethodSource
|
where statement with table
|
Mocking |
Mockito |
Built-in mock capabilities |
Filtering test execution |
@Tag
|
Custom annotations with runner configuration |
Extending the test framework |
@ExtendWith
|
@ExtensionAnnotation
|
All tests can be executed with the help of Gradle. The project provides a Gradle Wrapper so no installation of the Gradle runtime is needed.
junit5-vs-spock-feature-comparison's People
Contributors
Watchers