Testing, Performance and CI/CD Interview Questions for Mobile App Development
25 Testing, Performance and CI/CD questions with answers for mobile app development roles — 6 easy, 12 medium, 7 hard.
About Testing, Performance and CI/CD
Quality separates hobby apps from professional ones. This topic covers unit, widget, component and end-to-end testing with Flutter test, Jest, Testing Library, Maestro and Detox, plus profiling, startup time, memory leaks, app size, security practices, crash monitoring and CI/CD pipelines. Expect questions about debugging production issues and setting quality gates.
Sheet progressStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
Unit tests check pure Dart logic like validators, repositories and state notifiers. Widget tests render a single widget or screen in a test environment with WidgetTester, simulate taps and text entry, and assert what appears, running fast without a device. Integration tests, using the integration_test package, run the full app on a device or emulator for end-to-end flows. Golden tests compare widget screenshots to catch visual regressions.
02
Write a Flutter widget test that taps a button and checks the counter text.
Use Jest as the test runner with React Native Testing Library, which renders components and queries them the way users do, by text, role or label. Fire events like fireEvent.press or userEvent, then assert on output. Mock native modules and network calls with jest mocks or MSW. For end-to-end tests on real builds, use Detox or Maestro, which drive the app on emulators and simulators.
04
Write a React Native Testing Library test for a login button showing a validation error.
Integrate a crash reporting tool like Firebase Crashlytics or Sentry, upload debug symbols, dSYMs and source maps so stack traces are readable, and record non-fatal errors with context. Track crash-free users, ANR rate, app start time, slow frames and network latency per release. Set alerts on spikes and review store vitals. Tag events with app version, device and OS so problems can be isolated quickly.
06
How do you make sure your code works before handing it to QA?
I test the happy path and edge cases myself on both Android and iOS, including no network, slow network, empty states, large text sizes and rotation. I write unit tests for logic and run the existing test suite. I review my own diff before raising the pull request and add clear testing notes for QA explaining what changed and what to check, which saves time for both of us.
Maestro is an open-source mobile UI testing framework where flows are written in simple YAML, such as launchApp, tapOn "Login" and assertVisible "Welcome". It works with native, Flutter and React Native apps on Android and iOS, handles waiting automatically, and reduces flakiness compared to many older tools. Teams use it for smoke tests of critical journeys in CI because tests are quick to write and readable by QA.
Run the app in profile mode on a real device, not debug or emulator. Use Flutter DevTools: the performance view shows frame build and raster times, the CPU profiler finds expensive functions, and the memory view tracks allocations and leaks. Target under about 16 milliseconds per frame for 60 fps. The performance overlay shows UI and raster thread graphs, and rebuild tracking highlights widgets rebuilding too often.
09
How do you reduce app size for Flutter and React Native apps?
Publish Android App Bundles so users download only their architecture and density resources. In Flutter, use --split-debug-info and --obfuscate, remove unused packages and fonts, compress images and use tree-shaken icons. In React Native, enable Hermes, R8 minification and resource shrinking, and remove heavy libraries. For both, analyse size with tools like flutter build --analyze-size or APK Analyzer and lazy-load large assets.
10
How do you detect and fix memory leaks in cross-platform apps?
Leaks usually come from subscriptions, timers, controllers and listeners that are never disposed, or global caches that grow without limits. In Flutter, dispose controllers and cancel stream subscriptions in dispose, and check the DevTools memory view for growing instances. In React Native, return cleanup functions from useEffect and remove event listeners. Repeatedly open and close a screen while profiling to confirm memory returns to baseline.
11
How do you set up CI/CD for a cross-platform mobile app?
On every pull request, run lint, formatting checks, unit and widget or component tests. On merge, build signed Android and iOS release artifacts using CI services such as GitHub Actions, Codemagic, Bitrise or EAS Build, with signing keys stored as secrets. Use fastlane or EAS Submit to upload to internal testing tracks and TestFlight. Automate version numbers, generate release notes and run smoke tests with Maestro.
12
Write a GitHub Actions workflow that runs Flutter tests on every pull request.
Use HTTPS everywhere and consider certificate pinning for high-risk apps. Store tokens only in secure storage, never log sensitive data, and keep secrets on the server. Obfuscate release builds, validate all input on the server, and protect sensitive screens from screenshots where needed. Check device integrity with platform attestation APIs for high-risk actions, and follow the OWASP Mobile Application Security Verification Standard as a checklist.
14
Integration tests pass locally but fail randomly in CI. How do you make them reliable?
Flaky tests usually come from timing assumptions, shared state, network dependence or slow emulators. Replace fixed delays with waiting for specific conditions, mock or stub network calls with predictable responses, reset app data between tests, and use stable selectors like keys or test IDs instead of text that changes. Give CI emulators enough resources, retry only as a temporary measure, and track flaky tests separately to fix them.
15
After a release, crash reports show a spike only on one Android OS version. What steps do you take?
Pause the staged rollout to limit impact. Filter crash reports by OS version and device to find the top stack trace, and check behaviour changes for that version, such as permission, background or edge-to-edge rules. Reproduce on an emulator of that version, fix it, add a regression test and resume rollout with a hotfix. Add that OS version to the regular test device matrix.
16
Your team has no automated tests and frequent regressions. How would you introduce testing?
Start where bugs hurt most: write unit tests for business logic like pricing, validation and state transitions, and a few end-to-end smoke tests for login, checkout and payment flows with Maestro or integration tests. Run them in CI on every pull request so failures block merges. Require tests for bug fixes going forward. Show reduced regressions after a few sprints to build team support.
17
A security audit finds that the app stores the access token in plain shared preferences. How do you fix it?
Move tokens to secure storage backed by Keychain on iOS and Keystore on Android, such as flutter_secure_storage or expo-secure-store. Migrate existing users by reading the old value once, writing it securely and deleting the plain copy. Shorten access token lifetime, use refresh tokens, exclude sensitive files from backups, and clear tokens on logout. Retest with the audit team to confirm the issue is closed.
18
How do you decide which devices to test on for an Indian user base?
Use analytics from the existing app or market data to identify the most common manufacturers, OS versions, screen sizes and RAM levels among your users. Cover a budget device with 3 to 4 GB RAM, a mid-range phone, a recent flagship, an older OS version you still support, and at least one iPhone and tablet. Use cloud device farms for wider coverage and add devices that generate many crashes.
Impeller is Flutter's rendering engine that replaced Skia as the default on iOS and on modern Android devices. It precompiles a smaller set of shaders at build time instead of compiling them at runtime, which removes the shader compilation jank that first-time animations used to cause. It provides more predictable frame times. Developers rarely interact with it directly, but they should test on real devices when upgrading Flutter.
20
A Flutter animation is smooth on a flagship phone but janky on a budget phone. How do you fix it?
Profile on the budget device in profile mode. Common fixes: wrap frequently repainting areas in RepaintBoundary, avoid expensive effects like Opacity on large subtrees, clipping and shadows in scrolling lists, use AnimatedBuilder with child so static parts do not rebuild, precache images and decode them at display size, and move heavy computation to isolates. Reduce animation complexity on low-end devices if needed.
21
The app takes six seconds to start on low-end phones. How do you improve it?
Measure cold start on a release or profile build and trace what runs before the first frame. Defer non-critical SDK initialisation such as analytics and ads, avoid large synchronous storage reads and network calls before showing UI, load the first screen with cached data, and lazy-load other features. In Flutter, keep main() light; in React Native, use Hermes and inline requires. Use a native splash screen to avoid a blank screen.
22
QA reports the app becomes slower the longer it is used. How do you investigate?
This suggests a memory leak or growing work. Reproduce by repeating a flow many times while profiling memory and CPU. Look for listeners, timers or subscriptions that accumulate, caches without limits, lists that keep growing, or screens kept in the navigation stack. Fix by disposing resources, limiting cache sizes and replacing screens instead of pushing endlessly. Confirm memory returns to baseline after fixes.
23
How would you set quality gates before a mobile release?
Define clear criteria: all automated tests pass, no open critical or high bugs, crash-free rate in beta above an agreed threshold like 99.5 percent, performance budgets for startup time and app size met, accessibility checks on new screens, and security review for sensitive changes. Run smoke tests on the release build on real devices. Release with a staged rollout and monitor metrics before expanding.
24
Tell me about a bug that was hard to reproduce and how you solved it.
Situation: some users reported a blank screen after login, but no one on the team could reproduce it. Task: find the cause. Action: I added breadcrumb logs and non-fatal error reports around the login flow, and found it happened when the device clock was wrong, making tokens appear expired. I changed expiry checks to rely on server responses. Result: reports stopped, and we kept the breadcrumbs for future debugging.
25
What is a performance budget and how do you enforce it?
A performance budget sets limits on metrics like cold start time, app download size, frame rendering time and memory usage. Enforce it by measuring in CI, for example tracking release build size per pull request and running startup benchmarks on a reference device, and failing or flagging builds that exceed limits. Budgets make performance a shared responsibility rather than something fixed only after users complain.
Frequently asked questions
How important is Testing, Performance and CI/CD in Mobile App Development interviews?
Quality separates hobby apps from professional ones. This topic covers unit, widget, component and end-to-end testing with Flutter test, Jest, Testing Library, Maestro and Detox, plus profiling, startup time, memory leaks, app size, security practices, crash monitoring and CI/CD pipelines. Expect questions about debugging production issues and setting quality gates.
How should I use the Testing, Performance and CI/CD sheet?
Go top to bottom — easy to hard. Answer before opening each answer, tick what you solved and save misses to Last-Minute Revision.