How to Test Dark Mode on Android (Complete Guide)

Testing dark mode on Android apps is crucial to ensure a seamless user experience. Poorly implemented dark mode can lead to decreased user engagement, increased complaints, and ultimately, a loss of u

March 01, 2026 · 3 min read · How-To Guides

Introduction to Dark Mode Testing

Testing dark mode on Android apps is crucial to ensure a seamless user experience. Poorly implemented dark mode can lead to decreased user engagement, increased complaints, and ultimately, a loss of users. Common failures in dark mode testing include inconsistent theme application, incorrect color schemes, and neglected accessibility features.

What to Test in Dark Mode

The following test cases should be considered when testing dark mode on Android apps:

+ Successful theme switch from light to dark mode

+ Successful theme switch from dark to light mode

+ Persistent theme selection across app restarts

+ Correct rendering of UI elements in dark mode

+ Handling of theme switch failures (e.g., due to low storage or corrupted files)

+ Recovery from theme switch errors

+ Error messages and warnings in dark mode

+ Theme switch during ongoing operations (e.g., file downloads or uploads)

+ Theme switch with multiple windows or fragments open

+ Theme switch with third-party libraries or dependencies

+ WCAG 2.1 AA compliance: Ensure sufficient color contrast between UI elements and background

+ High contrast mode: Verify that high contrast mode is supported and functional in dark mode

+ Screen reader compatibility: Test that screen readers can navigate and read UI elements correctly in dark mode

Manual Testing Approach

To manually test dark mode on an Android app:

  1. Enable dark mode: Go to the device's Settings app, select "Display," and toggle "Dark theme" to the "On" position.
  2. Launch the app: Start the app and navigate through its features to verify that dark mode is applied correctly.
  3. Test theme switch: Switch between light and dark modes using the device's settings or the app's built-in theme switcher (if available).
  4. Verify UI elements: Check that all UI elements, including text, buttons, and images, are rendered correctly in dark mode.
  5. Test error scenarios: Simulate theme switch failures or errors and verify that the app handles them correctly.
  6. Test edge cases: Perform theme switches during ongoing operations, with multiple windows or fragments open, or with third-party libraries.

Automated Testing Approach

Automated testing can be performed using tools like Appium or Espresso. Here's an example of how to use Appium to automate dark mode testing:


// Import necessary libraries
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;
import io.appium.java_client.android.AndroidDriver;

// Set up the Appium driver
AppiumDriver<MobileElement> driver = new AndroidDriver<>(new Url("http://localhost:4723/wd/hub"), capabilities);

// Enable dark mode
driver.findElement(By.xpath("//android.widget.Switch[@text='Dark theme']")).click();

// Launch the app
driver.findElement(By.xpath("//android.widget.TextView[@text='App Name']")).click();

// Verify UI elements in dark mode
WebElement uiElement = driver.findElement(By.xpath("//android.widget.Button[@text='Button Text']"));
Assert.assertTrue(uiElement.getCssValue("background-color").equals("rgba(0, 0, 0, 1)"));

How SUSA Tests Dark Mode Autonomously

SUSA, an autonomous QA platform, tests dark mode using its 10 built-in user personas, including:

SUSA's autonomous testing approach eliminates the need for manual testing or scripting, allowing developers to focus on fixing issues rather than writing test code. With SUSA, you can simply upload your APK or web URL, and the platform will explore your app autonomously, detecting issues like crashes, ANR, dead buttons, accessibility violations, and security issues. SUSA also auto-generates Appium (Android) + Playwright (Web) regression test scripts, making it easier to integrate automated testing into your CI/CD pipeline. Additionally, SUSA's cross-session learning capability allows it to get smarter about your app every run, providing more accurate and comprehensive test results. By leveraging SUSA's autonomous testing capabilities, you can ensure that your app's dark mode is thoroughly tested and provides a seamless user experience.

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free