I want to use fdescribe
to make sure just on test runs.
When I use github "Quick/Quick"
is works for an iOS test target. On tvOS I have to downgrade to github "Quick/Quick" == 2.0
.
But when I switch to github "Quick/Quick" "master"
it seems to be broken on both platforms.
Only the tests in this file run.
All the tests run until I hit the tests in this file and Xcode stops the test suite.
List the software versions you're using:
Please also mention which package manager you used and its version. Delete the
other package managers in this list:
carthage version
in Terminal)Looks like the test in our test suite is passing in all supported platforms (macOS, iOS, tvOS, SwiftPM on macOS, SwiftPM on Linux). It would be great if you could provide a reproducible case/project.
I am seeing the same issue, will see if I can come up with a sample project tomorrow.
I tried using Quick from the master branch (after the #873 fix was merged) and the probleem seems to persist. I'll see if I can upload a sample project this weekend.
I tried using Quick from the master branch (after the #873 fix was merged) and the probleem seems to persist.
@fousa I didn't mean #873 may be a fix for this, but meant #873 may be the cause of this.
Ah alright, my bad.
Any updates on this? I'm running into this issue right now and since the last comment is from May I was hoping you found a fix.
Okay so I spent some time trying to figure this out.
Example setup with three specs, single test focused using fit
:
How it worked before: (I'm not really sure which version changed it, but I guess it's 2.1.0):
Run tests --> only TestCase4 is executed.
How it works now:
Run tests --> TestCase1, TestCase2, TestCase3, TestCase4 are executed
But what is strange is, if instead I focus on TestCase1, it only runs that one and doesn't even proceed to other tests. I guess that is accidentally the case also in your unit tests. The focused test-cases are run first, so it stops right after those.
How it worked before is the intended behavior, right? At least that is how some other test frameworks work with test focusing.
I guess something has changed in how focused tests are discovered?
However I found out that setting QuickConfiguration
's runAllWhenEverythingFiltered
to false makes the test focusing behave as before. Of course this is not a real solution, but anyone having this problem might be able to set it to false during development to focus tests.
This is the commit (#873) that caused the issue.
Renaming defaultTestSuite
back to initialize
solves it.
Didn't go deep into that, but seems that buildExamplesIfNeeded
should be called before defaultTestSuite
.
Adding initialize
back to QuickSpec
class also solves to issue:
+ (void)initialize {
[self buildExamplesIfNeeded];
}
I submitted a possible fix for this issue in #980. Could you all try that branch?
v2.2.1 has been released. Please try it!
Most helpful comment
Okay so I spent some time trying to figure this out.
Example setup with three specs, single test focused using
fit
:How it worked before: (I'm not really sure which version changed it, but I guess it's 2.1.0):
Run tests --> only TestCase4 is executed.
How it works now:
Run tests --> TestCase1, TestCase2, TestCase3, TestCase4 are executed
But what is strange is, if instead I focus on TestCase1, it only runs that one and doesn't even proceed to other tests. I guess that is accidentally the case also in your unit tests. The focused test-cases are run first, so it stops right after those.
How it worked before is the intended behavior, right? At least that is how some other test frameworks work with test focusing.
I guess something has changed in how focused tests are discovered?
However I found out that setting
QuickConfiguration
'srunAllWhenEverythingFiltered
to false makes the test focusing behave as before. Of course this is not a real solution, but anyone having this problem might be able to set it to false during development to focus tests.