Apache Cordova Testing Guide (Legacy Hybrid Apps)

Cordova apps were the hybrid-mobile standard 2012-2018. Many apps remain on Cordova in 2026. Testing them requires working with a legacy framework that is still maintained but no longer the default fo

February 05, 2026 · 3 min read · Testing Guides

Cordova apps were the hybrid-mobile standard 2012-2018. Many apps remain on Cordova in 2026. Testing them requires working with a legacy framework that is still maintained but no longer the default for new projects. This guide covers practical approaches for existing Cordova apps.

What Cordova is

Web app (HTML + JS) wrapped in a WebView, with plugins exposing native functionality. Similar to Ionic's Capacitor but older and more rough around the edges.

Most Cordova apps in 2026:

Testing them is about confidence in legacy code.

Unit tests

Web code in Cordova is testable with Jest / Jasmine / Mocha like any web app:


import { login } from './auth';
test('login with valid creds', async () => {
  const mockApi = { post: jest.fn().mockResolvedValue({success: true}) };
  const result = await login('test@example.com', 'correct', mockApi);
  expect(result.success).toBe(true);
});

Mock Cordova plugins (cordova-plugin-device, etc.) — all have global cordova.plugin.xxx references.

E2E testing

Browser testing (without Cordova)

Run the web app in a plain browser. Most flows work with native plugins stubbed. Playwright / Cypress drive the app.

Appium for full Cordova

Appium + WebView context switching:


// After launching app, switch to WebView context
await driver.switchContext('WEBVIEW_com.example');
// Now use web-style selectors
await driver.$('#email').setValue('test@example.com');

WebView context switch is idiosyncratic; requires enabled Chrome DevTools debugging for Android, Safari Developer Tools for iOS.

Plugin testing

Each Cordova plugin is a bridge to native. Testing the plugin in isolation:

Legacy challenges

Cordova + old OS versions

Older Cordova plugins may not support current iOS / Android. Fix: update plugin versions or migrate.

WebView quirks

Android System WebView varies by Android version. Older Android WebViews have weaker support. Test on minimum Android version.

Plugin deprecation

Many Cordova plugins abandoned. If using, risk is high. Consider Capacitor equivalents.

Build breakage

Gradle / CocoaPods updates often break Cordova builds. Periodic maintenance required.

Testing matrix

Minimum:

Full:

Migration testing

When migrating off Cordova (to Capacitor, React Native, Flutter):

  1. Contract tests between old and new: same API responses
  2. UI parity tests: snapshots from old vs new
  3. Gradual rollout: Cordova and new co-exist, compare metrics

How SUSA tests Cordova apps

SUSA drives Cordova-built native apps like any other. WebView context is handled:


susatest-agent test cordovaapp.apk --persona curious --steps 200

Exploration surfaces bugs regardless of underlying framework. For Cordova specifically, WebView rendering differences vs current web are common findings.

Common bugs in maintained Cordova apps

  1. Plugin version incompatibility with new OS — feature broken after OS update
  2. WebView CSS differences — works in Chrome, broken on old Android WebView
  3. Cordova CLI version bumps — build fails
  4. XML parser differences in plugin configuration
  5. Certificate pinning plugin incompatible with newer TLS

Cordova still works in 2026, but its stewardship is low. If possible, migrate. If not, test conservatively and maintain plugin versions deliberately.

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