AppCode vs. Xcode Unit Testing Battle

Share

AppCode vs. Xcode: Which is easier to use for unit testing? Which gives better feedback?

I’ve written about the big improvements to OCMockito’s error reporting. But when I ran the tests, I saw striking differences between the two IDEs.

Screencast: Unit testing comparison

It’s easier to show than to explain, so watch the 4½-minute screencast…

For some reason, Xcode is mouse-centric. Maybe it demos better?

From its early days, AppCode has had a keyboard-centric design. It may not look as sexy, but it sure is faster to operate. It gives more feedback about unit tests, and fast feedback is key to staying “in the zone.” I spend less time clicking around, less time trying to find the results I need.

Xcode is mouse-centric. AppCode is keyboard-centric. If you want to move fast with your tools, the keyboard wins.

AppCode vs. Xcode: Depends on the language? Not any more

When I first wrote this post in April 2016, I said, “AppCode is still not ready for effective Swift coding.” But now I live in AppCode for Swift development. It doesn’t yet have all the refactoring support they offer for Objective-C. But it’s a start!

For Objective-C? No contest.

No matter what language you use, be sure to get my free set of test snippets for both AppCode & Xcode.

Here are my recent blog posts featuring AppCode:

What are your favorite things about AppCode? Leave a comment below.

About the Author Jon Reid

Jon is a consultant on Clean Code for iOS, focusing on Test Driven Development, unit testing, refactoring, and design. He's been practicing TDD since 2001. You can learn more about his background, or see what services he can bring to your organization.

follow me on:
Disclosure: The book links below are affiliate links. If you buy anything, I earn a commission, at no extra cost to you.
  • rizwan says:

    The video is a somewhat unfair comparison. If you use the keyboard Cmd+Shift+Y Xcode will give you the same area on screen as AppCode and give you equivalent information on test failures and log messages

    • Jon Reid says:

      Command-Shift-Y does show the Debug Area, which usually includes the Console. And there you can see the entire console output. How are you supposed to find the message for one particular test? By doing Command-F to find some text. I usually search for “error” or the name of the test.

      By contrast, what AppCode does is show, for each test, the console output that occurred for that specific test. As I show, you can see this in Xcode also — but Xcode strips out newlines. I really don’t see why Xcode made the extra effort to remove information.

      • bsr says:

        You have the same information in Xcode : press Cmd-U to run the tests, and in the “Report Navigator” (Cmd-8), select the last test report (with the keyboard arrow keys, if you prefer, or by clicking on the test report). In the “Logs” tab, you have the same tree, with running time, etc. And you can even restart some tests from there…
        In Xcode, you can navigate through the different window areas with shortcuts like Cmd-J, etc.

        • Jon Reid says:

          I think I show those options in my screencast. The biggest difference is that I need to do all this navigating & disclosing in Xcode. In AppCode, I do nothing.

          • Alexey Gordeev says:

            You can use Xcode’s behavior panel to tell Xcode what he should do if any test failed.
            Like “Show Debugger with console view” and “Show navigator with test navigator”. Furthermore, you can run your own custom script to do what you want.
            So the comparison is still looks a little bit unfair to me.

            • Jon Reid says:

              Alexey, I’ve used Xcode behaviors. Showing the console upon test failure is helpful. But it’s simply not as good AppCode’s output. I don’t have to read through the log to find the relevant portion.

  • >