How to Test Cookie Consent on Android (Complete Guide)

Testing cookie consent is crucial to ensure that Android apps comply with regulations, such as the General Data Protection Regulation (GDPR) and the California Consumer Privacy Act (CCPA). Failure to

January 15, 2026 · 3 min read · How-To Guides

Introduction to Cookie Consent Testing

Testing cookie consent is crucial to ensure that Android apps comply with regulations, such as the General Data Protection Regulation (GDPR) and the California Consumer Privacy Act (CCPA). Failure to properly implement cookie consent can result in significant fines and damage to an app's reputation. Common failures include inadequate notification, incomplete opt-out options, and unclear consent language.

What to Test

The following test cases cover various aspects of cookie consent:

+ User accepts all cookies

+ User accepts necessary cookies only

+ User declines all cookies

+ User is not prompted for cookie consent

+ Cookie consent prompt is not dismissible

+ App crashes when user interacts with cookie consent prompt

+ User clears app data and reinstalls the app

+ User uses a cookie blocker

+ App is used in a region with strict cookie regulations

+ Cookie consent prompt is accessible via screen reader

+ Cookie consent prompt has sufficient color contrast

+ Cookie consent prompt can be navigated using assistive technologies

Manual Testing Approach

To manually test cookie consent on an Android app:

  1. Install the app: Install the app on a physical device or emulator.
  2. Launch the app: Launch the app and wait for the cookie consent prompt to appear.
  3. Interact with the prompt: Interact with the cookie consent prompt, selecting different options (e.g., accept all, accept necessary, decline all).
  4. Verify behavior: Verify that the app behaves as expected after each selection (e.g., cookies are set or not set).
  5. Test error scenarios: Test error scenarios, such as attempting to dismiss the prompt without selecting an option.
  6. Test edge cases: Test edge cases, such as clearing app data and reinstalling the app.

Automated Testing Approach

Automated testing can be performed using tools like Appium or Espresso. For example, using Appium, you can write a test script in Java to automate cookie consent testing:


import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;
import org.junit.Test;

public class CookieConsentTest {
    @Test
    public void testCookieConsent() {
        // Launch the app
        AppiumDriver<MobileElement> driver = new AppiumDriver<>(new URL("http://localhost:4723/wd/hub"), capabilities);

        // Wait for cookie consent prompt
        MobileElement cookieConsentPrompt = driver.findElement(By.id("cookie_consent_prompt"));

        // Select accept all option
        cookieConsentPrompt.findElement(By.id("accept_all")).click();

        // Verify cookies are set
        // ...
    }
}

How SUSA Tests Cookie Consent Autonomously

SUSA, an autonomous QA platform, tests cookie consent using its 10 user personas, including the curious, impatient, and accessibility personas. These personas catch various issues, such as:

SUSA's autonomous testing also covers error scenarios and edge cases, providing a comprehensive assessment of an app's cookie consent implementation. With SUSA, you can simply upload your APK file or provide a web URL, and the platform will explore your app autonomously, identifying issues and generating regression test scripts. SUSA's WCAG 2.1 AA accessibility testing ensures that cookie consent prompts are accessible to users with disabilities. Additionally, SUSA's cross-session learning capabilities allow it to get smarter about your app every run, providing more accurate and comprehensive test results.

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