Test fails: "expected to eventually be true, got <true>"
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- ios, swift
- Domain
- mobile-dev, testing
Research direction
Start by reproducing the intermittent failure with expect(myFunc()).toEventually(beTrue(), timeout: myTimeout) in the stated iOS UI Testing environment, including the beTruthy() variant. The fix is complete when expectations that become true no longer fail intermittently and the behavior is covered by a reproducible test.
Written by the indexing model from the issue text.
Description
Nimble: 5.1.0, xcode: 8.0 (8A218a), using cocoapods, UI Testing bundle, iOS simulator (iPad 2 Air)
I really like Nimble, thanks!
Observed behaviour:
Tests sometimes fail with the following message: "expected to eventually be true, got ". When rerunning the same test it often just passes.
Expected behaviour:
When expectations gets true using the matcher beTrue() it should not fail.
Steps to reproduce:
- I haven't been able to consistently reproduce. The same tests sometimes fail with this message and sometimes don't. It happens in different test classes.
- The code is always of the following form:
expect(myFunc()).toEventually(beTrue(), timeout: myTimeout)wheremyFunc()is in a different helper class. - The same happens with the beTruthy() matcher.
Screenshot from Xcode

- Dominant language
- Swift
- Stars
- 4.8k
- Forks
- 609
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Quick/Nimble
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Similar issues
-
tvOS
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
skiptools/skip-fuse-ui#147 ·
-
area:collectors P2
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
catehstn/social-brain-app#183 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100