April 5, 2016

AppCode vs. Xcode Unit Testing Battle

6  comments

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.

__CONFIG_colors_palette__{"active_palette":0,"config":{"colors":{"62516":{"name":"Main Accent","parent":-1}},"gradients":[]},"palettes":[{"name":"Default Palette","value":{"colors":{"62516":{"val":"var(--tcb-skin-color-0)"}},"gradients":[]},"original":{"colors":{"62516":{"val":"rgb(19, 114, 211)","hsl":{"h":210,"s":0.83,"l":0.45}}},"gradients":[]}}]}__CONFIG_colors_palette__
__CONFIG_colors_palette__{"active_palette":0,"config":{"colors":{"49806":{"name":"Main Accent","parent":-1},"3a0f6":{"name":"Accent Light","parent":"49806","lock":{"saturation":1,"lightness":1}}},"gradients":[]},"palettes":[{"name":"Default","value":{"colors":{"49806":{"val":"var(--tcb-skin-color-0)"},"3a0f6":{"val":"rgb(238, 242, 247)","hsl_parent_dependency":{"h":209,"l":0.95,"s":0.36}}},"gradients":[]},"original":{"colors":{"49806":{"val":"rgb(19, 114, 211)","hsl":{"h":210,"s":0.83,"l":0.45,"a":1}},"3a0f6":{"val":"rgb(240, 244, 248)","hsl_parent_dependency":{"h":209,"s":0.36,"l":0.95,"a":1}}},"gradients":[]}}]}__CONFIG_colors_palette__
Previous
__CONFIG_colors_palette__{"active_palette":0,"config":{"colors":{"49806":{"name":"Main Accent","parent":-1},"3a0f6":{"name":"Accent Light","parent":"49806","lock":{"saturation":1,"lightness":1}}},"gradients":[]},"palettes":[{"name":"Default","value":{"colors":{"49806":{"val":"var(--tcb-skin-color-0)"},"3a0f6":{"val":"rgb(238, 242, 247)","hsl_parent_dependency":{"h":209,"l":0.95,"s":0.36}}},"gradients":[]},"original":{"colors":{"49806":{"val":"rgb(19, 114, 211)","hsl":{"h":210,"s":0.83,"l":0.45,"a":1}},"3a0f6":{"val":"rgb(240, 244, 248)","hsl_parent_dependency":{"h":209,"s":0.36,"l":0.95,"a":1}}},"gradients":[]}}]}__CONFIG_colors_palette__
Next

Jon Reid

About the author

Programming was fun when I was a kid. But working in Silicon Valley, I saw poor code lead to fear, with real human costs. Looking for ways to make my life better, I learned about Extreme Programming, including unit testing, test-driven development (TDD), and refactoring. Programming became fun again! I've now been doing TDD in Apple environments for 19 years. I'm committed to software crafting as a discipline, hoping we can all reach greater effectiveness and joy.

  • 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

    • 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.

      • 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.

          • 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.

            • 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.

  • {"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

    Never miss a good story!

    Want to make sure you get notified when I release my next article or video? Then sign up here to subscribe to my newsletter. Plus, you’ll get access to the test-oriented code snippets I use every day!

    >