spek v2.0.9 Release Notes

Release Date: 2019-12-09 // about 1 month ago
  • 🚀 A minor release to support the release of IntelliJ IDEA 2019.3 (see #809).

    🆕 New features

    💅 (#799) New fixture aliases added to the gherkin style

    💅 The following aliases are now available in the gherkin style:

    • Scenario.beforeScenario -> Scenario.beforeGroup
    • Scenario.afterScenario -> Scenario.afterGroup
    • Scenario.beforeEachStep -> Scenario.beforeEachTest
    • Scenario.afterEachStep -> Scenario.afterEachTest
    • Feature.beforeEachScenario -> Feature.beforeEachGroup
    • Feature.afterEachScenario -> Feature.afterEachGroup
    • Feature.beforeFeature -> Feature.beforeGroup
    • Feature.afterFeature -> Feature.afterGroup

    💅 The aliased fixtures will be deprecated in the context of the gherkin style.

    🗄 Deprecations

    (#798) Usage of CachingMode.GROUP is now considered an error

    This mode was replaced by CachingMode.EACH_GROUP on version 2.0.3.

    Others

    • (#820) Bump JUnit Platform dependency to 1.5.2
    • ♻️ (#808) Internal refactoring to use coroutines more.

Previous changes from v2.0.8

  • 🔀 Artifacts are now synced to maven central

    👀 See #764 for more details.

    Timeouts

    🚀 Test timeouts were added in 2.0.3 but it was hard to configure and there was no way to disable it - causing issues when using a debugger. This release includes several improvements to this feature.

    Setting timeouts globally

    🔧 (#769) On the JVM the global timeout can be configured via the system property SPEK_TIMEOUT

    Disable timeouts

    ⏱ (#792) A value of 0 will disable the timeout.

    🛠 Fixtures

    🆕 New fixtures

    (#670) beforeEachGroup and afterEachGroup fixtures are now available. They are invoked for every group including the group where they are declared (similar to how CachingMode.EACH_GROUP works).

    🗄 Deprecation

    💅 (#787) The fixture aliases before, after, beforeEach and afterEach in the specification style are now deprecated.

    Scope value (aka memoized) access are now stricter

    👀 (#789) Scope values will now throw an exception when accessed in the wrong context. A good example is accessing a scope value with CachingMode.TEST in a beforeGroup fixture. See ticket for the motivation and more details.

    ✅ LifecycleListener now reports test failures.

    👀 See #761 for the motivation and more details.

    🛠 Other fixes/changes

    • (#737) Validating a return value examples show use of lateinit on primitives which throws a compiler error
    • ✅ (#750) Allow running tests on source root
    • 📦 (#763) Run all specs in a package of a common module
    • 🔧 (#794) Improve how run configurations are named