This repository is used to create a Cordova testing application that verifies the core functionality and plugins of Apache Cordova.
Its purpose is to be executed as part of the release process for platforms, plugins, and tools.
It uses the cordova-plugin-test-framework
, which provides the ability for manual and automated testing.
(History: A long time ago, this repository included all manual and automated plugin tests before they were extracted and moved into the respective plugins.)
This repository contains the following:
-
Template for the Cordova testing app
-
config.xml
The configuration file for the testing application.
-
www
This folder contains:
- A web-based UI template for the testing application.
- Pages for manually testing various Cordova functionalities.
- Benchmarks and links for triggering manual and automated tests.
The preconfigured Cordova functionalities include:
- Battery
- Events
- Keyboard
- LazyloadJS
- SQL
- Storage
- Miscellaneous features
-
-
cordova-plugin-echo
(Internal Plugin)A simple echo function implemented for testing the Cordova bridge.
-
cordova-plugin-mobilespec-tests
(Internal Plugin)Contains non-plugin automated tests for Cordova.
-
Interactive CLI Setup Tool
The main tool used to automatically create and configure the Mobile Spec application.
You should already have a workspace that contains all Cordova repositories. It is RECOMMENDED to use cordova-coho
to set up your workspace, as it will automatically clone all necessary repositories.
You can also manually set up a workspace, but for this tool to work, the following criteria MUST be met:
-
The Cordova workspace directory MUST contain at least one or more active Apache Cordova core plugins.
-
The Cordova workspace directory MUST contain at least one or more active Apache Cordova core platforms.
-
The Cordova workspace directory MUST contain
cordova-plugin-test-framework
. -
It is RECOMMENDED that the Cordova workspace directory contains the
cordova-mobile-spec
repository.- If
cordova-mobile-spec
is inside the Cordova workspace, the interactive CLI tool will automatically detect the other repositories in the parent directory. - If
cordova-mobile-spec
is located elsewhere, you MUST specify the workspace path using theCORDOVA_WORKSPACE
environment variable when running the interactive CLI.
- If
Run the following command in the root directory of cordova-mobile-spec
:
npm install
To enable the mobilespec
command to run from any directory, run the following command in the root directory of cordova-mobile-spec
:
npm link
Note: The app created when running the
mobilespec
command will be generated in the Cordova workspace.
Once the prerequisites are met, you can launch the interactive CLI tool from the Cordova workspace directory.
If Global Command Support was configured:
mobilespec
Or, without global installation:
npx ./cordova-mobile-spec