How to import my App module into MyAppUITests file?

前端 未结 5 1931
被撕碎了的回忆
被撕碎了的回忆 2021-01-08 00:00

This is my simple test case:

import XCTest
@testable import MyApp //it doesn\'t work

because of this:

class TabBar         


        
5条回答
  •  情书的邮戳
    2021-01-08 00:16

    This is a response from Apple:

    UI tests execute differently from Unit tests - Unit tests run inside your application process so they can access your application code. UI tests execute in a separate process, outside your application, so they can simulate how the user interacts with the application. It’s not expected that you will be able to access your app class from a UI test.

提交回复
热议问题