Trying to find out WHY my XCode UI Tests builds fails on bitrise but not locally (even bitrise-cli).
I have some questions:
Which specis bitrise OS X VM uses?
per How to upgrade spec of machine or use many cores for building I see '2 CPUs’
per https://github.com/bitrise-io/osx-box-bootstrap (is this relevant to actual builds you use?) it’s '4 Gb RAM / 2vCPU’
which vSphere version? Which type of disks?
Most frequent issues:
- You try to access an API which can’t be accessed from bitrise.io build VMs, e.g. because it’s behind a VPN
- You have a popup in your code, which is presented the first time the app starts. You most likely don’t clear your iOS Simulators locally, but the ones on bitrise.io are always clean, so it’s the first run of the app on that simulator.
If that doesn’t help, please send us the build log in email/through the onsite chat, with as much info as you can share (e.g. what the failing test does) and we’ll have a look ASAP.
This is most likely irrelevant to the issue, but:
- 2 vCPUs (you don’t have real CPUs in a distributed system, vCPU means CPU allocation, but the system can migrate the VM between CPUs etc. or even grant more resources when available)
- 4 GB RAM (Elite configs have 8 GB)
- vSphere version: I don’t think this is relevant, and we do update vSphere occasionally, so I’d rather not share a version info here as it’ll most likely get outdated (and not really relevant to the issue).
- Same for storage, we did change the storage in the last year and might change it in the future too. Right now it’s a full flash distributed storage, designed for datacenter/distributed system usage, the fastest we could get.
If you can’t figure out the issue any other way, we can create a temporary VM for you, running on the same infra but on a network which you can access (build VMs are running on a private network which you can’t access directly), with remote desktop enabled.
But first it’d be good to have more info, as I wrote above (build log, what fails / what kind of test fails - e.g. an API call).
The solution, reported by the user:
My app is trying to test loads lot of data from YouTube on startup (using YouTube API and some direct queries, this is done in async way)
I was trying what exactly was wrong.
So I i found that it’s some some timing issue combiting with some iOS10 issues(?!)
a lot of issues were due «UI Test Activity:
Use cached accessibility hierarchy for xxx» in test logs
After combining https://stackoverflow.com/questions/31182637/delay-wait-in-a-test-case-of-xcode-ui-testing and http://stackoverflow.com/questions/34320480/is-there-a-way-to-clear-refresh-the-accessibility-hierarchy-cache
I was able to make tests run on bitrise.
(and also on XCode Bot which I created while debugging - it also encountered )