This repository contains the following:
Template for the Cordova testing app
config.xml
The configuration file for the testing application.
www
This folder contains:
The preconfigured Cordova functionalities include:
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.
cordova-mobile-spec
is inside the Cordova workspace, the interactive CLI tool will automatically detect the other repositories in the parent directory.cordova-mobile-spec
is located elsewhere, you MUST specify the workspace path using the CORDOVA_WORKSPACE
environment variable when running the interactive CLI.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