BehaviorSpec run parallel?
See original GitHub issueWhen I execute this BehaviorSpec, the upper when
block always fails (even when I swap those two). the upper block assignment is always overridden by the latter. Is this an issue or I just misunderstand spec flow?
given("user) {
val user = User()
`when`("set valid email") {
user.email = VALID_EMAIL
then("should get correct email") {
user.email shouldBe VALID_EMAIL
}
}
`when`("set null email") {
user.email = null
then("should get null email") {
user.email shouldBe null
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Project Level Config - Kotest
You can ask Kotest to run specs in parallel to take advantage of modern cpus with several cores by setting the parallelism level...
Read more >Run tests in single Spec in parallel ini kotest - Stack Overflow
I'm using kotest for my e2e API testing. All tests are independent and should have no problem running them in parallel. But with...
Read more >Kotest Pro Tips - ProAndroidDev
Set the system property kotest.parallelism to a value higher than 1, and separate test files will be executed inside a thread pool.
Read more >Lifecycle behaviour in combination with BehaviorSpec #776
I prefer BDD style which is why I'm using BehaviorSpec. ... DispatchedTask.run(Dispatched.kt:233) at java.util.concurrent.
Read more >How to use behaviorSpec method of io.kotest.core.spec.style ...
Accelerate Your Automation Test Cycles With LambdaTest. Leverage LambdaTest's cloud-based platform to execute your automation tests in parallel and trim down ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is fixed in 3.0.0 RC1. If you have the time, please give it a try. There are some breaking changes that should be aware of by reading the changelog here: https://github.com/kotlintest/kotlintest/blob/master/CHANGELOG.md
The issue is, the
when
block has to be executed in order to discover thethen
block nested inside. However, this means the side effects (setting user.email) overwrite each other.