简体   繁体   English

为XCTest添加测试资产

[英]Add Test-Assets for XCTest

I want to do a couple of tests regarding images (eg if image are resized correctly). 我想对图像进行一些测试(例如,如果图像正确调整了尺寸)。

How can I add specific images (or assets) to a project that are only available for the tests? 如何将仅可用于测试的特定图像(或资产)添加到项目中?

Add your images or assets to your project then set the "Target Membership" for your test target in the "File Inspector". 将图像或资产添加到项目中,然后在“文件检查器”中为测试目标设置“目标成员身份”。

在此处输入图片说明

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM