2.0.13discovery and execution started using coroutines, which means they are not confined to a single thread anymore. This can be problematic as most test frameworks like mokk (and possibly mockito) rely on test execution to be confined in a single thread (#923). Another side effect is that the test execution order wasn't deterministic anymore as at any given point a coroutine can be suspended and control is given elsewhere. This release fixes both that issue, Spek is still using coroutines but the runtime ensures that a given test class will always be confined to a single thread.
🚀 This release adds several system properties to control how Spek does discovery and execution.
spek2.discovery.parallel.enabled- controls whether discovery is done in parallel or not, by default it is disabled. The presence of this property regardless of value will enable parallel discovery.
spek2.execution.parallel.enabled- controls whether execution is done in parallel or not, by default it is disabled. The presence of this property regardless of value will enable parallel execution.
SPEK2_TIMEOUTis now deprecated (will be removed in 2.1.0) and will be replaced by this property. Controls how long a test can run before timing out, by default it is disabled - i.e tests won't timeout.
A note for parallel execution
✅ Parallelism is at a class level not individual test scopes. Spek uses coroutines under the hood to execute tests in parallel, essentially
spek2.execution.parallel.enabledjust controls which
CoroutineDispatcheris used. For parallel executions
Dispatchers.Defaultis used, otherwise the one provided by
🚀 Patch release that adds support for IJ 2020.2 EAP and AS 4.0. The following AS and IJ versions are no longer supported:
- Android Studio 3.3
- Android Studio 3.4
- IntelliJ IDEA 2018.2
- IntelliJ IDEA 2018.3
- IntelliJ IDEA 2019.1
- IntelliJ IDEA 2019.2
v2.0.11May 30, 2020
🚀 This releases add supports for Android Studio 3.6 and IntelliJ IDEA 2020.1
🆕 New features
- 👌 Support for Android Studio 3.6
- 👌 Support for IntelliJ IDEA 2020.1 EAP
- 🆕 New IDE inspection for spek classes without a no-arg constructor not marked
abstractor any of the following annotations:
- ✅ The IJ test runner now explicitly exits even if there are non-daemon threads around after test execution. (#848)
🗄 Deprecations and removals
CachingMode.GROUPhas now been deleted, this was deprecated a couple of release ago. (#798)
🚀 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:
💅 The aliased fixtures will be deprecated in the context of the
(#798) Usage of CachingMode.GROUP is now considered an error
This mode was replaced by
🔀 Artifacts are now synced to maven central
👀 See #764 for more details.
🚀 Test timeouts were added in
2.0.3but 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
⏱ (#792) A value of
0will disable the timeout.
🆕 New fixtures
afterEachGroupfixtures are now available. They are invoked for every group including the group where they are declared (similar to how
💅 (#787) The fixture aliases
afterEachin 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
beforeGroupfixture. See ticket for the motivation and more details.
✅ LifecycleListener now reports test failures.
👀 See #761 for the motivation and more details.
🛠 Other fixes/changes
v2.0.7September 05, 2019