Objective-C
Last updated
Last updated
An example UI testing bundle AppfigurateExampleUITests
is available in AppfigurateExample
. To test, ensure AppfigurateExample (ObjC iOS)
is selected as the scheme, then long tap the run button to show more options and tap Test
(⌘U).
As your target app links AppfigurateLibrary.xcframework
, Xcode will automatically make the framework available for the testing target.
Tap on your APLConfiguration
subclass in the project navigator. In File inspector ‣ Target membership, tick on your UI testing bundle.
In your APLConfiguration
subclass, ensure that your allowInvalidSignatures method returns YES
when running automation tests. (Test schemes are by default run with a DEBUG build).
When the configuration is applied to the application on launch, the standard Appfigurate 'Configuration applied' alert is displayed. You can optionally add an UIInterruptionMonitor
to your XCTestCase
to automatically dismiss this alert.
Objective-C example
Create an instance of your APLConfiguration
subclass in your XCTestCase
. A good place to do this in the setUp method.
Set the properties required to be applied to your app to allow it to be tested correctly.
Objective-C example
Apply the result of APLConfiguration
automationLaunchArguments method to XCUIApplication launchArguments
property.
Launch your app.
Objective-C example
Once your app is launched, the configuration you set in Create instance of APLConfiguration subclass will be applied before executing each test case.
See also automationLaunchArgumentsReset and automationLaunchArgumentsWithAction methods of APLConfiguration
.