Over a million developers have joined DZone.

Xcode 6: Usable Testing

· Mobile Zone

Visually compose APIs with easy-to-use tooling. Learn how IBM API Connect provides near-universal access to data and services both on-premises and in the cloud, brought to you in partnership with IBM.

If you’d overlooked the improvements to testing in Xcode 6, understandably enough what with the new language and all, they’re definitely worth taking a look at:

XCTest​Case / XCTest​Expectation / measure​Block()

New in Xcode 6 is the ability to benchmark the performance of code

Perhaps the most exciting feature added in Xcode 6 is built-in support for asynchronous testing…

Xcode 6 seems to have fulfilled all of the needs of a modern test-driven developer. Well, perhaps save for one: mocking … However, this may not actually be necessary in Swift, due to its less-constrained syntax.

In Swift, classes can be declared within the definition of a function, allowing for mock objects to be extremely self-contained. Just declare a mock inner-class, override and necessary methods:

With Xcode 6, we’ve finally arrived: the built-in testing tools are now good enough to use on their own.

Which means we can hopefully look forward to Xcode 6 hosted CI services that can run a decent test suite easily. No more messing with Jenkins or whatever, w00t! Here’s a list of the various CI services we’ve noted here and there compatible with iOS/OS X projects so far:

Travis CI is free for open source, paid for private

Hosted CI is an iOS and OS X focused service, with free open source and cheap indie plans

Ship.io used to be called cisimple, and whilst being rebranded it’s totally free

Greenhouse CI is fresh out of beta: they support Android as well, and have a free 2-app plan

While we wait to see which of these support Xcode 6 first, Dear Readers, any experience positive or negative with them to share? Or any other iOS-supporting CI services you’d recommend everyone consider/avoid?

The Mobile Zone is brought to you in partnership with Strongloop and IBM.  Visually compose APIs with easy-to-use tooling. Learn how IBM API Connect provides near-universal access to data and services both on-premises and in the cloud.


Published at DZone with permission of Alex Curylo, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}