简体   繁体   中英

Execute XCUITests on static iOS framework

I have developed a static iOS .framework but during its development, we figured out that its manual testing is taking much time due to a huge number of datasets.

In order to minimize its testing time, we have decided to automate this process so we can have less testing time which will empower our Quality Assurance team to test datasets within no time.

Specifically, we want to execute XCUITests on one of the framework's UIViewController on which SDK is taking UITextfield input ie we want to automate form filling exercise for that particular view controller.

I have successfully captured activities and interactions using XCUITest but I want to execute those test functions at the time when a user lands on that view controller. Currently, those test functions are executed on time ie even SDK is not being initiated.

My question is, is it possible to execute XCUITests on the static iOS framework? If yes, is it possible to start execution on the desired event?

Thanks

XCUITests execute in a separate process and build as a separate target, so it is impossible to start them from within the app as you describe. Also, XCUITests can only interact with what VoiceOver / accessibility can interact with, so you must have some sort of application installed on a device or simulator to execute tests against.

The recommended approach is to build a simple sample application that loads your framework / UI and then execute your XCUITests against the sample application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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