For the complete documentation index, see llms.txt. This page is also available as Markdown.

ABTasty QA Assistant

This package allows QA teams and developers to easily test campaigns, force variations, and verify flag values in real-time within their Flutter applications. Using ABTasty QA Assistant

Table of Contents

  • Overview

  • Features

  • Prerequisites

  • Installation

  • Quick Start

  • Detailed Integration

    • Initialize Flagship SDK

    • Setup QA Assistant

    • Display Overlay Button

    • Live Flag Updates

  • Key Features

  • Best Practices

  • Troubleshooting

  • Additional Resources


Overview

The ABTasty QA Assistant provides an intuitive in-app interface for testing A/B campaigns, feature flags, and variations during development and QA phases. It seamlessly integrates with the Flagship Flutter SDK to provide real-time flag updates and comprehensive campaign management.

⚠️ Production Warning

To prevent accidental inclusion in production, wrap the QA Assistant initialization with a debug check:


Features

  • 🎯 Campaign Management - View, test, and force variations for A/B tests and feature flags

  • πŸ”„ Live Flag Updates - Real-time flag value changes when forcing variations

  • πŸ“Š Allocation Viewer - Check traffic distribution across variations

  • 🎨 Overlay Button - Floating button for easy access during testing

  • πŸ” Targeting Inspection - Verify targeting rules and conditions

  • πŸ“ˆ Event Tracking - Monitor all events sent to Flagship

  • πŸ§ͺ Variation Testing - Force specific variations to test different experiences


Prerequisites

Before integrating the ABTasty QA Assistant, ensure you have:

  • Flutter SDK installed (>=3.6.1)

  • An ABTasty account with:

    • Environment ID

    • API Key

  • The Flutter Flagship SDK v4.3.0 installed in your project


Installation

Step 1: Add Dependencies

Add both the Flagship SDK and QA Assistant to your pubspec.yaml:

Step 2: Install Packages

Run the following command:


Quick Start

Get up and running in 5 minutes with this complete example:

Step 1: Replace Your Credentials

Replace these placeholders with your actual values:

  • YOUR_ENVIRONMENT_ID - Your Flagship environment ID

  • YOUR_API_KEY - Your Flagship API key

Step 2: Copy & Paste This Code

Step 3: Run Your App

Step 4: Use the QA Assistant

  1. Tap the bug icon in the AppBar (top-left)

  2. The QA overlay button appears in the bottom-right corner

  3. Tap the overlay button to open the QA Assistant dialog

  4. Browse campaigns and force different variations

  5. Watch the flag value update live when you select variations


Detailed Integration

1. Initialize Flagship SDK

First, initialize the Flagship SDK in your app:

2. Setup QA Assistant

Initialize the QA Assistant with your credentials:

3. Display Overlay Button

Show the floating overlay button in your app:

Add a button in your AppBar:

4. Live Flag Updates

Enable live flag updates to automatically refresh your UI when flags are modified through the QA Assistant:

Important: Setup the listener AFTER creating the visitor:


Key Features

🎯 Campaign Management

The QA Assistant provides a comprehensive interface to:

  • View all campaigns - See active, inactive, and forced campaigns (A/B tests, toggles, personalizations)

  • View variations - Explore different variations for each campaign with all associated flags

  • Force variations - Override the default allocation and test specific variations

  • Reset to original - Return to the production variation with a single tap

  • View allocations - Check traffic distribution across variations

  • Check targeting - Verify targeting rules and conditions

See Using ABTasty QA Assistant for more information

πŸ”„ Live Flag Updates

Real-time flag value changes when you force variations through the QA Assistant:

πŸ“Š Comprehensive Views

  • Variations Tab - See all flags and their values for each variation

  • Allocation Tab - View traffic distribution percentages

  • Targeting Tab - Check targeting rules and audience criteria

  • Dashboard Tab - See campaign state and status

  • Events Tab - Monitor events sent to Flagship in real-time

πŸ” Context Management

  • View current context - See all context key-value pairs for the visitor

  • Modify context - Update context values for testing different targeting scenarios


Best Practices

1. Initialize in Debug Mode Only

Only enable the QA Assistant in debug/staging environments:

2. Always Dispose Properly

Clean up resources when the widget is disposed:

Troubleshooting

Issue: Overlay button not showing

Solution: Make sure you've called showOverlayButton(context) with a valid BuildContext:

Issue: Flags not updating after forcing a variation

Solution: Ensure the flag update listener is properly registered:

Also verify that onFlagUpdate callback is set:

Issue: "Allocation has been bypassed" message

This is expected when you force a campaign. The allocation is bypassed because you've manually selected a variation instead of letting the normal traffic allocation decide. This is working as intended.

Issue: QA Assistant not compiling in production build

Make sure to wrap QA Assistant code in debug checks:

Consider using build flavors to completely exclude the package from production builds.


Additional Resources


Example Application

A complete demo application is included in the example/ directory. To run it:

The example demonstrates:

  • Complete Flagship SDK integration

  • QA Assistant setup

  • Live flag updates

  • Multiple campaign types

  • Context management

Last updated

Was this helpful?