How to import my App module into MyAppUITests file?

前端 未结 5 1887
被撕碎了的回忆
被撕碎了的回忆 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:19

    Since Apple prevents you from accessing your main application from the UI tests, you might think about reorganizing your application structure to store the relevant data which needs checking into a spot accessible to the UI tests.

    You might consider moving definitions and data from your main application class to a separate class which can be loaded by the test framework.

提交回复
热议问题