FSJUnitTestLog 1.0

FSJUnitTestLog 1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Felix Schulze.



  • By
  • Felix Schulze

FSJunitTestLog is a XCTestObserver implementation for iOS 7+ XCTests, which converts the test results to an JUnit XML Results file.

Install

Using CocoaPods:

target :YourTestTarget do
    pod 'FSJUnitTestLog', '~> 0.9.0'
end

Basic usage

Add the code at the beginning of your app delegate:

#ifdef DEBUG
    const char *env = getenv("FSJUnitTestLog");
    if (env) {
        NSLog(@"Run Unit-Tests with FSJUnitTestLog");
        [[NSUserDefaults standardUserDefaults] setObject:@"XCTestLog,FSJUnitTestLog" forKey:@"XCTestObserverClass"];
        [[NSUserDefaults standardUserDefaults] synchronize];
        return YES;
    }
#endif

Edit your scheme, go to "Test" - "Arguments" and add the Environment Variable FSJUnitTestLog with the value 1

Settings Screen

Continuous Integration

TeamCity

TeamCity support is integrated. TeamCity automatically imports the generated JUnit.xml file with service messages.

Jenkins

Jenkins support is integrated, but you must install the JUnit Attachments Plugin.

Demo

The demo project uses CocoaPods for dependency management.

Install dependencies: pod install

License

FSJunitTestLog is available under the MIT license. See the LICENSE file for more info.