简体   繁体   English

在 Xcode UI 测试中,我在哪里可以找到我的应用程序的 xcresult 日志?

[英]Where can I find the xcresult logs from my application in an Xcode UI Test?

On running a UI Test, I can see the .xcresult file generated in ~/Library/Developer/Xcode/DerivedData .在运行 UI 测试时,我可以看到在~/Library/Developer/Xcode/DerivedData中生成的.xcresult文件。 I have some NSLogs in my application that I need to display as well.我的应用程序中有一些 NSLogs 也需要显示。 Does anyone know where is the path to get the application log or xcresult file?有谁知道获取应用程序日志或 xcresult 文件的路径在哪里?

The path your Xcode project's xcresult files as of Xcode 14.1 is从 8825512549188 14.1 开始,您的 Xcode 项目的xcresult文件的路径是

/Users/USER_NAME/Library/Developer/Xcode/DerivedData/APPNAME-SOME_XCODE_ID/Logs/Test/Test-SCHEME_NAME-DATE.xcresult

So if your username is gran_profaci , your app name is MyAwesomeApp , your scheme name is AwesomeScheme and you live in timezone UTC-5 your path would look something like this:所以如果你的用户名是gran_profaci ,你的应用程序名称是MyAwesomeApp ,你的方案名称是AwesomeScheme并且你住在时区 UTC-5 你的路径看起来像这样:

/Users/gran_profaci/Library/Developer/Xcode/DerivedData/MyAwesomeApp-aiupaskztadstnnevejnfigoiug/Logs/Test/Test-AwesomeScheme-2022.11.21_09-39-19--0500.xcresult

Each test you run will create a new xcresult file with the corresponding parameters and current date.您运行的每个测试都将创建一个新的 xcresult 文件,其中包含相应的参数和当前日期。

You can directly open the DerivedData folder from Xcode by clicking on the icon displaying a right arrow inside a circle:您可以通过单击圆圈内显示向右箭头的图标直接打开来自 Xcode 的 DerivedData 文件夹: Xcode 首选项 > 位置

If you want to extract information you can use the xcparse command line tool , in your example to export the logs:如果您想提取信息,可以使用xcparse 命令行工具,在您的示例中导出日志:

xcparse logs /path/to/Test.xcresult /path/to/exportLogFiles

the path most likely appears on the terminal /Users//Documents/P/ios/build/<>/Logs/Test/Run-<.....>.xcresult该路径最有可能出现在终端 /Users//Documents/P/ios/build/<>/Logs/Test/Run-<.....>.xcresult

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在哪里可以在xcode中找到“应用程序ID”? - where can I find 'Application ID' in xcode? Xcode UI Test 的截图文件在哪里? - Where is the screenshot file from Xcode UI Test? Xcode-Ui-Test:我可以指定要从终端运行的特定测试吗 - Xcode-Ui-Test: Can i specify a particular test that i want to run from terminal React Native:当我从 XCode 运行应用程序时看不到 console.logs - React Native: Can't see console.logs when I run application from XCode 我在哪里可以找到Xcode术语和定义? - Where can I find Xcode Terms and Definitions? 我的XCode UI测试如何检测屏幕是否已更改? - How can my XCode UI test detect that the screen has changed? 我可以从在xcode 6中创建情节提要的新xcode 8中上传构建内容吗?苹果会批准吗? - Can i upload build from new xcode 8 where my storyboard is created in xcode 6. Will apple approve it? 如何从Xcode UI测试访问核心数据存储? - How can I access a core data store from an Xcode UI test? 我在哪里可以找到Fabric的Crashlytics记录的日志 - Where can I find logs logged by Fabric's Crashlytics 如何在不更改iPhone上的语言首选项的情况下,使用Xcode以另一种语言测试我的iOS应用程序? - How can I test my iOS application, using Xcode, in another language without changing my language preferences on my iPhone?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM