如何将我的iOS UIAutomation测试的输出转换为Jenkins的JUnit样式输出?

Man*_*dyW 9 ios jenkins ios-ui-automation

我正在使用UIAutomation脚本来测试我的iOS应用程序.我已经设法从命令行运行脚本,但现在我需要以Jenkins可以理解的格式转换输出(通过/失败),理想情况是JUnit样式.

在我尝试写一个脚本之前,有没有人写过任何脚本?

非常感谢

ıɾu*_*uǝʞ 3

也许你可以看看:https ://github.com/shaune/jasmine-ios-acceptance-tests

编辑:我也避免使用茉莉花。为了“监听”开始、通过和失败测试,​​我简单地替换了UIALogger.logStart,UIALogger.logFailUIALogger.logPass

(function () {
    // An anonymous function wrapper helps you keep oldSomeFunction private     
    var oldSomeFunction = UIALogger.logStart;
    UIALogger.logStart = function () {
    //UIALogger.logDebug("intercepted a logStart : " + arguments);
    OKJunitLogger.reportTestSuiteStarting(arguments[0]);
    oldSomeFunction.apply(this, arguments);
    }
})();
Run Code Online (Sandbox Code Playgroud)