One issue with the XCTestExpectation note is that you can't wait for something if you don't know exactly how long it will take.
One issue with the XCTestExpectation note is that you can't wait for something if you don't know exactly how long it will take. Hard-coding in a timeout, essentially, can make your tests very brittle. Take, for instance, testing loading content from a local web server. Ideally your UI should be decoupled enough form your web server that you can mock it. That way you only have to wait for animation delays, and your tests don't fail if your server is down. That is if mocks fit in your testing philosophy, of course, but I think this is a place were the advantage of this approach is quite clear. And this clearly doesn't work for end-to-end tests, but those are inherently brittle.
Posted by Fargren on Jun 30, 2015, 12:15 PM
Tags
Related issues
Raise real-world problems, find people facing the same issue, and discuss solutions.5,500 issues0 comments
reliability (EdTech)
I frankly find the situation around UB puzzling.
I think it depends a little on how and where you work.
Self modifying has some sneaky failure modes with modern CPUs.
> Ban phones from class.
Coolify v5.x
Are you talking about a technical problem, or a conceptual problem?
This is not uncommon in the more blue-collar businesses.
> I wonder though, do people not strace programs any more?
One issue with the XCTestExpectation note is that you can't wait for something if you don't know exactly how long it will take.
One issue with the XCTestExpectation note is that you can't wait for something if you don't know exactly how long it will take. Hard-coding in a timeout, essentially, can make your tests very brittle. Take, for instance, testing loading content from a local web server. Ideally your UI should be decoupled enough form your web server that you can mock it. That way you only have to wait for animation delays, and your tests don't fail if your server is down. That is if mocks fit in your testing philosophy, of course, but I think this is a place were the advantage of this approach is quite clear. And this clearly doesn't work for end-to-end tests, but those are inherently brittle.
Comments (0)
No comments yet. Start the discussion.