QA Console¶
The Apptimize QA Console is a framework that you can integrate with your mobile app to preview variants in different combinations from all of your active feature flags and experiments on a simulator or device.
This approach of QA works well for large teams that would like to run tests while using the app. After you integrate the Apptimize QA Console, it will override your allocations and enforce your selected variants internally.
Important
The Apptimize QA Console is only intended to be integrated with debug or developer-build versions of your app. Do not include the Apptimize QA Console in releases that will be available to your end-users.
Integrating with an Android App¶
Download the latest release of the qaconsole.aar <https://sdk.apptimize.com/apptimize-qa-console/qaconsole.aar>.
Create or open an existing Android Studio project.
Click Import .JAR/.AAR Package and click Next.
. In the window that opens, selectExpand Gradle Scripts and open build.gradle (for Module:app). Add
implementation project (":qaconsole")
dependencies.Open the source for the main activity or an activity where you wish to integrate the Apptimize QA Console and add a private variable of the QAConsole type:
private QAConsole qaConsole;
Initialize a new QAConsole instance in your onCreate() method:
qaConsole = new QAConsole(getApplicationContext(), “<apptimizeAppKey>”);
In your Apptimize dashboard, create and launch your experiments.
Now, you can run your app on a device or emulator. If you are running on a device, shake the device to launch the Apptimize QA Console.
You can launch the Apptimize QA Console programmatically:
// Add the following line to your onCreate method after initializing the qaConsole.
console.isShakeGestureEnabled = false;
// Call the launch method when you wish to display the console.
console.launchQAConsoleActivity();
Note
In order to display Instant Updates while using the Apptimize QA Console to enforce specific variants, use the method setForceVariantsShowWinnersAndInstantUpdates(true) of ApptimizeOptions as follows:
final String appKey = "YourAppKey";
final ApptimizeOptions options = new ApptimizeOptions();
options.setForceVariantsShowWinnersAndInstantUpdates(false);
// ... set any additional options here
Apptimize.setup(self, appKey, options);
To build an AAR you need to open the ApptimizeQAConsole project in terminal and run the following command:
./gradlew :qaconsole:assembleRelease
See also
For more information, see the QA Console FAQ page <https://faq.apptimize.com/hc/en-us/articles/360021675293-How-do-I-use-the-Apptimize-QA-Console->.
Integrating with an iOS (Swift) App¶
Create or open an existing iOS Application (Swift) project.
Click File —> Add Packages and search for the package URL https://github.com/urbanairship/apptimize-qa-console-ios.
Specify the version (or use the main branch) and click Add Package.
See also
Adding package dependencies to your swift app <https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app>
CocoaPods
Add the following to your Podfile to import ApptimizeQAConsole as a dependency.
pod 'ApptimizeQAConsole'
Save your Podfile.
Run the following command from the command line in your application’s directory.
pod install
See also
CocoaPod’s Getting Started Guide <https://guides.cocoapods.org/using/getting-started.html>.
Integrating with your App
Open the source for the UIApplicationDelegate.
Import ApptimizeQAConsoleollowing:
import ApptimizeQAConsole
Add the following to your didFinishLaunchingWithOptions method:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // ...other application setup code ... // Use the shake gesture. ApptimizeQAConsole.isShakeGestureEnabled = true // ...or disable the shake gesture and use manual presentation only. ApptimizeQAConsole.isShakeGestureEnabled = false return true }
In your Apptimize dashboard, create and then launch your experiment(s).
Run your app on a device or emulator. If you are running on device, shake the device to launch the Apptimize QA Console. Alternatively, you can launch the Apptimize QA Console programmatically:
ApptimizeQAConsole.display()
Note
In order to display Instant Updates while using the Apptimize QA Console to enforce specific variants, you need to set ApptimizeForceVariantsShowWinnersAndInstantUpdates to YES in your Info.plist. Or, you can add the ApptimizeForceVariantsShowWinnersAndInstantUpdatesOption with a value of YES to the options dictionary and call Apptimize.start(withApplicationKey:options:).
To refresh your UI automatically whenever the Apptimize QA Console is hidden, listen to the notifications NSNotification.Name.ApptimizeQAConsoleWillDisappear, and NSNotification.Name.ApptimizeQAConsoleWillAppear.