ABTasty QA Assistant for React Native
This guide covers the integration of the ABTasty QA Assistant into React Native applications. For usage instructions, see the QA Usage Guide
Overview
What is ABTasty QA Assistant?
The ABTasty QA Assistant is a visual testing tool for React Native applications that integrates with ABTasty Feature Experimentation. It provides a floating UI overlay that allows developers and QA engineers to test campaign variations and feature flags without backend changes or app redeployment.
Key features
Force variations: Switches to a specific variation within a campaign
Force allocation: Makes a rejected campaign available for testing
Hide campaign: Hide accepted campaigns to test exclusion scenarios
Real-time event monitoring: Track all SDK events for integration verification
Context inspection: View visitor data and targeting rules
Search & filter: Quickly find specific campaigns and events
Forced allocations, variations, and hidden campaigns are temporary and reset when you disable QA mode or restart the app. Everything returns to natural allocation automatically.
Prerequisites
React Native
>= 0.70.0
React
>= 18.0.0
Flagship React Native SDK
>= 5.0.2
Installation
Dependencies
The QA Assistant has the following dependencies:
Peer Dependencies (must be installed separately):
@flagship.io/react-native-sdk>= 5.0.2react>= 18.0.0react-native>= 0.70.0
Integration
Quick start
Add the QA Assistant to your app in two steps:
Configuration options
Customize the QA Assistant appearance and behavior:
Available positions:
"top-right"- Top right corner"top-left"- Top left corner"bottom-right"- Bottom right corner (default)"bottom-left"- Bottom left corner
Complete example
Best practices
DO:
Always use
isQAModeEnabled={true}in FlagshipProviderPlace QAAssistant inside FlagshipProvider
Use conditional rendering (
__DEV__) to exclude from productionUse SDK hooks to ensure flag changes are reactive
DON'T:
Never include QA Assistant in production builds
Don't place QA Assistant outside FlagshipProvider
Don't hardcode flag values - always use SDK hooks
The QA Assistant should NEVER be included in production builds. Always use conditional rendering with __DEV__ or environment variables.
Exposing QA mode in production allows anyone to:
- View all campaign configurations
- Force any variation
- See internal feature flags
- Monitor SDK events
Troubleshooting & FAQ
Common issues
QA Assistant not showing
Checklist:
Verify
isQAModeEnabledis set totrueEnsure QAAssistant is inside FlagshipProvider
Check conditional rendering
Clear cache and reinstall
Console warnings
Warning: "Not able to access Flagship SDK instance"
Cause 1: QAAssistant is not a direct child of FlagshipProvider.
Solution: Move QAAssistant inside FlagshipProvider.
Cause 2: Flagship React Native SDK version is incompatible (< 5.0.2).
Solution: Update to SDK version >= 5.0.2:
Warning: "QA mode not enabled"
Solution: Add isQAModeEnabled={true} to FlagshipProvider.
Warning: "No valid envId configured"
Solution: Verify envId prop is set correctly in FlagshipProvider.
Campaigns not appearing
Possible Causes:
No campaigns configured - Check ABTasty platform
Network issues - Verify bucketing.json loads correctly
Wrong environment - Ensure using correct
envIdSDK initialization - Wait a few seconds after app launch
Forced Variations not applying
Solutions:
Use SDK hooks - Ensure you're using
useFsFlag():Verify correct variation - Check that the forced variation contains the expected flag modifications
Reset and retry - Clear forced variations and try again
Floating button overlapping UI
Solutions:
Changeposition:
Frequently asked questions
Q: Do forced allocations persist after app restart? A: NO! All forced allocations, hidden campaigns, and variations are temporary and reset automatically when:
You disable QA mode (set
isQAModeEnabled={false})You restart the app
This is by design to ensure a clean state and prevent accidental forced states in production.
Q: Can I force multiple campaigns at once? A: Yes, each forced variation, allocation, and hidden campaign is independent.
Q: What's the difference between forcing a variation, allocation, and hiding a campaign?
Force Variation
Campaign is accepted or forced
Switch between variations
Force Allocation
Campaign is rejected
Enable variation forcing (badge changes to "Forced", stays in Rejected section)
Hide Campaign
Campaign is accepted
Hide accepted campaign (test exclusion)
Q: Can I use QA Assistant in production?
A: NO! Always use conditional rendering ({__DEV__ && <QAAssistant />}) to exclude it from production.
Q: Does QA Assistant work offline? A: Initial load requires network to fetch campaigns. After that, it works offline with cached data.
Q: Can I force variations programmatically? A: QA Assistant is for manual testing. For automated tests, use Flagship SDK methods directly with controlled context values.
Additional resources
Usage Guide: See qa-use.md for detailed usage instructions
Flagship SDK Documentation: https://docs.developers.flagship.io/
Support: For issues or questions, contact ABTasty support
Last updated
Was this helpful?

