The state of iOS Open Source – and what to do about it!

Fredrik Olsson

There is a vibrant community of open source projects for iOS. You need a calendar UI components or a JSON parser? No problem, the projects are out there. Most code out there is of very high quality. Unfortunately the distribution of the code is generally very crude, barely half a step away from sharing code [...]

Tags: , , , , ,

Java API for testing Facebook application integration

Tobias Södergren

Since november 2010 you may create test user accounts on Facebook for your application, so that you may test your application without creating dummy accounts and possibly break the Facebook EULA. The test users may be managed using the Facebook Graph API. The application I was working on, which integrated with Facebook, needed automated integration [...]

Tags: , , ,

Using PowerMock with Spring integration testing

Johan Haleby

I quite often get the question if PowerMock can be used together with Spring integration testing or other frameworks that require a JUnit runner to bootstrap. The answer up until now has been somewhat ambiguous. The reason is that for the last year or so we’ve been working with a new way of bootstrapping PowerMock [...]

Tags: , ,

REST Assured – Or how to easily test REST services in Java

Johan Haleby

Testing and validating REST services in Java is harder than in dynamic languages such as Ruby and Groovy. REST Assured is a Java DSL (built on top of HTTP Builder) that brings the simplicity of these languages into the Java domain. Example 1 – JSON Assume that a GET request to http://localhost:8080/lotto returns JSON as: [...]

Tags: , , ,

Rewriting a Public Cocoa Touch API

Fredrik Olsson

Cocoa Touch added API for presenting a view controller in a popup bubble in iPhone OS 3.2, the responsible class is named UIPopoverController. One would guess that this new class is a subclass of UIViewController, just like UINavigationController is, but that is not the case. One would also guess that in functionality many ideas for [...]

Tags: , , , , , ,

Introduction to snmp4j

Johan Rask

Update 2010-09-22: Asynchronous fetch which is tested with Awaitility. SNMP is a widely accepted technology and is used in to monitor a wide variety of devices, but as it turns out very few people (at least among java programmers) seems to know anything about how to build snmp based solutions. This post will not discuss [...]

Tags: , , , ,

ASP.NET MVC vs. Rails3

Anders Janmyr

I recently was contacted to implement an ASP.NET MVC application and I saw this as a great opportunity to compare it with Rails3. What immediately strikes you when you start with ASP.NET MVC is how similar it is to Rails. No one can steal ideas like Microsoft! Rails ASP.NET MVC Purpose (if not obvious) /app/models [...]

Tags: , ,

iPad, the Future, and the Luxury of Starting Over

Fredrik Olsson

A luxury that you seldom have in the world of software development is the luxury of starting over. I am not talking about throwing away everything and start from scratch. But just taking what you have, and all the experiences learned. Apply some major refactoring to make what works really shine, and without care of [...]

Tags: , , , , ,

The easy way to test Android applications

Renas Reda

I’m going to guess that most of you know what instrumentation is. In the event that you don’t, instrumentation is a feature in which specific monitoring of the interactions between an application and the system is made possible. Instrumentation also makes it possible to write test cases that interact with the application. The problem with [...]

Tags: , , , ,

Test Driven Development in XCode

Christian Hedin

Test Driven Development, or TDD for short, is a simple software development practice where unit tests, small focused test cases, drive the development forward. This is most easily explained by the Three Rules of TDD that dictate the following: You are not allowed to write any production code unless it is to make a failing [...]

Tags: , , , , , , ,

Google Translate and iPhone apps

Fredrik Olsson

The Cocoa and Cocoa Touch frameworks has a really nice function for acquiring a localized string NSLocalizedString(). Just pass in a key and you are done, for strings that are known at least. Sometimes you are getting unknown strings from a data source not under your control, strings representing just a fraction of the text [...]

Tags: , , , , ,

Classloader Deep-Cloning without Serialization

Johan Haleby

Background In PowerMock we’re using a custom classloader to byte-code manipulate classes that are normally not mockable to make them mockable. But when running a test case there may be some cases when the user needs to byte-code manipulate a certain class (X) in the first test method but needs to have the class unmodified [...]

Tags: , , , , , , , ,

Load-time weaving, Spring and Maven.

Mattias Ask

As some of you might have read in my earlier post, I’m using load-time weaving in the project that I’m working on. Lately I’ve run in to some problems with getting the tests to play nice with Maven. So what was the problem? Well, I’ve been using @Configurable and @Autowired to inject stuff in my [...]

Tags: , , , , ,

PowerMock + TestNG = True

Johan Haleby

After having it on our todo list for at least a year we’ve finally managed to integrate PowerMock with TestNG 5.11 as of PowerMock version 1.3.5. This is a big milestone of the project since we’ve now demonstrated that PowerMock is decoupled from both a specific test framework and a specific mock framework. The TestNG [...]

Tags: , , ,

Under the Hood of ‘git clone’

Anders Janmyr

When you clone a git repository, everything is automatically setup to allow you to fetch, pull, push to and from the remote repository, origin. But what is really going on? git remote is configured with a few lines of configuration in the config file inside the .git/ directory. Here’s how it works: Create a new [...]

Tags: , , ,