FSJUnitTestLog 1.0

FSJUnitTestLog 1.0

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

Maintained by Felix Schulze.


Downloads

Total33
Week0
Month0

Installs

Apps3
Test Targets3
powered by Segment

GitHub

Stars11
Watchers1
Forks0
Issues0
Contributors1
Pull Requests0

Code

Files2
LOCLines of Code 79


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