Git Product home page Git Product logo

cordova-paramedic's Introduction

Cordova Paramedic (Test Automation)

Android Testsuite iOS Testsuite Chrome Testsuite

Paramedic • noun provides advanced levels of care at the point of illness or injury, including out of hospital treatment, and diagnostic services

cordova-paramedic is a tool to automate execution of Cordova plugins tests (via cordova-plugin-test-framework).

You can use Paramedic to build and run a Cordova app with plugin tests, run these tests on local and remote emulators on Sauce Labs, and report the results. It can be used on a local or Continuous Integration environment.

Cordova Paramedic is currently used to automatically run all plugin tests on CI.

(See this workshop instructions for some additional explanation.)

Table of Contents

Supported Cordova Platforms

  • Android
  • Browser
  • iOS
  • Windows

What does it do?

A full Paramedic run will:

  1. Create and prepare the app
    1. Create a temporary Cordova project with cordova create
    2. Install various plugins with cordova plugin add %local_path% (e.g. cordova plugin add ../cordova-plugin-inappbrowser):
      • the plugin to be tested (e.g. ../cordova-plugin-inappbrowser)
      • the tests of this plugin (e.g. ../cordova-plugin-inappbrowser/tests)
      • cordova-plugin-test-framework (from npm)
      • local paramedic-plugin
    3. Update the app start page to the test page at cdvtests/index.html (provided by cordova-plugin-test-framework and the plugin tests)
    4. Add the platform to be tested with cordova platform add ...
    5. Confirm the requirements for that platform are met with cordova requirements ...
    6. Start a local socket server for communication between the app running on a device/emulator and paramedic
    7. Make the server address known to the app
  2. Run the tests

    • Either run the main tests locally...
      1. Skip main tests if option set (platform != android)
      2. Start a file transfer server if required
      3. Get the test command for the platform
      4. Manipulate permissions on iOS
      5. Run the app (open in browser, start emulator, run on device or emulator) and start the tests by doing so
      6. Skip main tests if option set
      7. Skip tests if action = run|emulate (= build)
      8. Wait for device to connect to server before timeout
      9. Wait for the tests results
        1. Time out if "connection takes to long" TODO (failure)
        2. Receive and handle "tests are done" (success) and "device disconnected" (failure) events
      10. (browser) Close the running browser
      11. Run the Appium tests (with sauce = false)
    • ... or on Sauce Labs
      1. Build, package and upload the app to Sauce Labs or (platform = browser) open the app in a browser
      2. (platform = browser) Connect to Sauce Connect (Proxy)
      3. Connect to Web Driver on Sauce Labs
      4. Navigate Web Driver to correct page (browser) or webview (apps)
      5. Click "Auto Tests" if a plugin *wkwebview* is installed
      6. Find out if the "permission buster" should be skipped (plugins splashscreen or inappbrowser, browser): skipBuster
      7. Start polling in the background for events using the Web Driver (submitting skipBuster as well) every 2.5 seconds
      8. Wait for the tests results
        1. Time out if "connection takes to long" TODO (failure)
        2. Receive and handle "tests are done" (success) and "device disconnected" (failure) events
      9. Log success or failure
      10. Quit Web Driver
      11. (platform = browser) Close the open browser
      12. Close connection to Sauce Connect (Proxy)
      13. Run the Appium tests on Sauce Labs (with sauce = true)
    • Run the Appium tests
      1. Skip if action = build
      2. Skip is Appium should be skipped
      3. Skip if platform != android or ios
      4. !sauce: Error when no targetObj TODO
      5. Create Appium options
      6. Create AppiumRunner with options
        1. Prepare the submitted options
        2. Create screenshot directory
        3. Find the tests in plugin paths
        4. Set globals for the tests
      7. Skip if no Appium tests were found
      8. Prepare App in AppiumRunner
        1. Remove server address from app
        2. Reconfigure app (modify preferences + CSP, add plugin) <!-- 367, 375, 385 -- >
        3. Build app
      9. (sauce) Package and Upload the App to Sauce Labs
      10. Run tests via AppiumRunner
        1. (!sauce) Start iOS Proxy (ios_webkit_debug_proxy)
        2. (!sauce) Install (npm install appium) and start Appium server
        3. Start to run the Appium tests
        4. Handle eventual exceptions, return the result
  3. Clean up
    1. (!sauce)
      1. Handle timeouts of test execution above
      2. Collect Device Logs
      3. Uninstall App
      4. Kill Emulator Process
    2. (sauce) Display Sauce run details
    3. Clean up Project

Installation

Using npmjs registry version:

npm install -g cordova-paramedic

Using GitHub version:

npm install -g github:apache/cordova-paramedic

or

git clone https://github.com/apache/cordova-paramedic

If cloning from GitHub, you will need to run npm link inside the checkout repository.

Alternativly, replace all occurences of cordova-paramedic with the command:

  • cordova-paramedic/main.js for Linux or macOS
  • node cordova-paramedic/main.js for Windows

Usage

Paramedic parameters can be passed via command line arguments or separate configuration file:

By Command Line Arguments:

cordova-paramedic --platform PLATFORM --plugin PATH <other parameters>

By Configuration File:

cordova-paramedic --config ./sample-config/.paramedic.config.js

Common usages

Some common use cases of Paramedic:

Run without any parameters to get a list of supported parameters:

cordova-paramedic

Test your current plugin on an Android emulator:

cordova-paramedic --platform android --plugin ./

Test your current plugin on a specific Android device (ID via adb devices -l):

cordova-paramedic --platform android --plugin ./ --target 02e7f7e9215da7f8 --useTunnel

Test your current plugin on an Android 7.0 emulator on Sauce Labs:

cordova-paramedic --config conf/pr/android-7.0 --plugin ./

Command Line Interface

What to build and test

--platform (required)

Specifies target Cordova platform (could refer to local directory, npm or git)

cordova-paramedic --platform ios --plugin cordova-plugin-inappbrowser
cordova-paramedic --platform [email protected] --plugin cordova-plugin-inappbrowser
cordova-paramedic --platform ios@../cordova-ios --plugin cordova-plugin-inappbrowser
cordova-paramedic --platform ios@https://github.com/apache/cordova-ios.git#4.1.0 --plugin cordova-plugin-inappbrowser

--plugin (required)

Specifies test plugin, you may specify multiple --plugin flags and they will all be installed and tested together. You can refer to absolute path, npm registry or git repo. If the plugin requires variables to install, you can specify them along with its name.

cordova-paramedic --platform ios --plugin cordova-plugin-inappbrowser
cordova-paramedic --platform ios --plugin 'azure-mobile-engagement-cordova --variable AZME_IOS_CONNECTION_STRING=Endpoint=0;AppId=0;SdkKey=0'
cordova-paramedic --platform ios --plugin https://github.com/apache/cordova-plugin-inappbrowser
// several plugins
cordova-paramedic --platform ios --plugin cordova-plugin-inappbrowser --plugin cordova-plugin-contacts

--verbose (optional)

Verbose mode. Display more information output

cordova-paramedic --platform ios --plugin cordova-plugin-inappbrowser --verbose

--cli (optional)

A path to Cordova CLI. Useful when you're testing against locally installed Cordova version.

cordova-paramedic --platform android --plugin cordova-plugin-device --cli ./cordova-cli/bin/cordova

--justbuild (optional)

Just builds the project, without running the tests.

cordova-paramedic --platform ios --plugin cordova-plugin-inappbrowser --justbuild

Emulator/Device to use for tests

--target (optional)

For Android: The device ID (from adb devices -l) of a device the tests should be run on.

cordova-paramedic --platform android --plugin cordova-plugin-contacts --target 02e7f7e9215da7f8

For iOS: A string that is used to pick the device (from the cordova run --list --emulator output) the tests should be run on.

cordova-paramedic --platform ios --plugin cordova-plugin-contacts --target "iPhone-8"

Test Result Server

--useTunnel (optional)

Use a tunnel (via localtunnel) instead of local address (default is false). Useful when testing on real devices and don't want to specify external IP address (see --externalServerUrl below) of paramedic server.

cordova-paramedic --platform ios --plugin cordova-plugin-inappbrowser --useTunnel

--externalServerUrl (optional)

Useful when testing on real device (--device parameter) so that tests results from device could be posted back to paramedic server.

cordova-paramedic --platform ios --plugin cordova-plugin-inappbrowser --externalServerUrl http://10.0.8.254

--port (optional)

Port to use for posting results from emulator back to paramedic server (default is from 8008). You can also specify a range using --startport and endport and paramedic will select the first available.

cordova-paramedic --platform ios --plugin cordova-plugin-inappbrowser --port 8010
cordova-paramedic --platform ios --plugin cordova-plugin-inappbrowser --startport 8000 endport 8020

Test configuration

--timeout (optional)

Time in millisecs to wait for tests to pass|fail (defaults to 10 minutes).

cordova-paramedic --platform ios --plugin cordova-plugin-inappbrowser --timeout 30000

--outputDir (optional)

Directory location to store test results in junit format and the device logs

cordova-paramedic --platform ios --plugin cordova-plugin-inappbrowser --outputDir /Users/sampleuser/testresults

--cleanUpAfterRun (optional)

Flag to indicate the sample application folder must be deleted.

cordova-paramedic --platform ios --plugin cordova-plugin-inappbrowser --cleanUpAfterRun

--logMins (optional)

Windows only parameter to indicate the duration for which the device logs to be fetched.

cordova-paramedic --platform windows --plugin cordova-plugin-inappbrowser --logMins 15

--tccDb (optional)

iOS only parameter. The path to the sample TCC DB file, with permissions, to be copied to the simulator.

cordova-paramedic --platform ios --plugin cordova-plugin-contacts --tccDbPath tcc.db

--args (optional)

Add additional parameters to the cordova build and cordova run commands.

cordova-paramedic --platform ios --plugin cordova-plugin-contacts --args=--buildFlag='-UseModernBuildSystem=0'

Sauce Labs

--shouldUseSauce (optional)

Run tests on Sauce Labs. You'll need to specify Sauce Labs username and access key using either --sauceUser and --sauceKey arguments or SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables.

--sauceUser (optional)

Sauce Labs username. Alternatively set via the SAUCE_USERNAME environment variable.

--sauceKey (optional)

Sauce Labs access key. Alternatively set via the SAUCE_ACCESS_KEY environment variable.

cordova-paramedic --platform ios --plugin cordova-plugin-contacts --shouldUseSauce --sauceUser ***** --sauceKey ***** --buildName "paramedic-test-01"

--buildName (optional)

Build name to show on Sauce Labs dashboard. If omitted, will use "Paramedic sauce test" and a timestamp.

--sauceDeviceName (optional)

Name of the Sauce Labs emulator or browser. For example, "iPhone Simulator" or "firefox". Please refer to the Sauce Labs platforms list to see available device names.

--saucePlatformVersion (optional)

Platform version of the Sauce Labs emulator OS, or version of the browser (if testing browser platform). For example, "9.3" or "54.0". Please refer to the Sauce Labs platforms list to see available platform versions.

--sauceAppiumVersion (optional)

Appium version to use when running on Sauce Labs. For example, "1.5.3".

cordova-paramedic --platform ios --plugin cordova-plugin-contacts --shouldUseSauce --sauceUser ***** --sauceKey ***** --sauceDeviceName 'iPad Simulator" --saucePlatformVersion 9.1 --appiumVersion 1.5.2

Configuration file

Configuration file is used when no parameters are passed to cordova-paramedic call or explicitly specified via --config parameter:

cordova-paramedic           <- paramedic will attempt to find .paramedic.config.js in working directory
cordova-paramedic --config ./sample-config/.paramedic.config.js

Example configuration file is showed below.

module.exports = {
    // "externalServerUrl": "http://10.0.8.254",
    "useTunnel": true,
    "plugins": [
        "https://github.com/apache/cordova-plugin-inappbrowser"
    ],
    "platform": "windows",
    "action": "run",
    "args": "--archs=x64 -- --appx=uap"
}

More configuration file examples could be found in sample-config folder.

API Interface

You can also use cordova-paramedic as a module directly:

var paramedic = require('cordova-paramedic');
paramedic.run(config);

Quirks

Windows

For Paramedic to work correctly for Windows apps you'll need to allow the loopback for "HelloCordova" app using Windows Loopback Exemption Manager (download).

cordova-paramedic's People

Contributors

airdrummingfool avatar alsorokin avatar breautek avatar dependabot[bot] avatar erisu avatar filmaj avatar gedasga avatar gmotzespina avatar janpio avatar jcesarmobile avatar johanlantz avatar knight9999 avatar mrfatstrat avatar niklasmerz avatar purplecabbage avatar raphinesse avatar riknoll avatar sarangan12 avatar sgrebnov avatar shazron avatar stevengill avatar timbru31 avatar tripodsan avatar tsubik avatar vladimir-kotikov avatar zachawilson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-paramedic's Issues

Running on Windows for Windows app requires certificate installation as Administrator

When running on Windows, apparently a signing certificate needs to be installed on the local machine. This requires elevated permissions.

Both are a problem. Even if I were to acquire those permissions or get around requiring them, I still don't think installing a new certificate into my certificate store on each run is a good solution.

Attempting to install application...
Found package: C:\Users\Oliver\AppData\Local\Temp\tmp-17712006Vtxxg4lfi\platforms\windows\AppPackages\CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test\CordovaApp.Windows10_1.0.0.0_anycpu_debug.appx
Found certificate: C:\Users\Oliver\AppData\Local\Temp\tmp-17712006Vtxxg4lfi\platforms\windows\AppPackages\CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test\CordovaApp.Windows10_1.0.0.0_anycpu_debug.cer

Before installing this app, you need to do the following:
        - Install the signing certificate
Administrator credentials are required to continue.  Please accept the UAC prompt and provide your administrator password if asked.
Press Enter to continue...:

Relates to #37

Fork commits worth merging / creating a PR

There are multiple forks of this project, and some have commits and changes that might be worth being merged here:

https://github.com/Alpha-health/cordova-paramedic

https://github.com/meteor/cordova-paramedic/ (branches):

https://github.com/ratson/cordova-paramedic:

Info.plist not found

When running cordova-paramedic --platform ios --plugin cordova-plugin-zencam --verbose.

This error appears:

No target specified for emulator. Deploying to iPhone-X, 12.1 simulator
/private/var/folders/_t/pxl23c8j27jbnnrmsmhl6qwc0001b8/T/tmp-25703ql9alOcv3wy6/platforms/ios/build/emulator/HelloCordova.app/Info.plist file not found.
Error: cordova emulate return error code 1

I have already tried to use --buildFlag='-UseModernBuildSystem=0' and running the command this way,

cordova-paramedic --platform ios --plugin cordova-plugin-zencam --verbose --args=--buildFlag='-UseModernBuildSystem=0'

Another thing I have tried is running iOS on platform 5.0.0 this way,

cordova-paramedic --platform [email protected] --plugin cordova-plugin-zencam --verbose

But then this errors appears,

cordova-paramedic: starting local medic server [email protected]
(node:26754) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
platform is not supported :: [email protected]

It would be ideal to support [email protected]

Handle "The environment you requested was unavailable." more prominent

If Saucelabs fails with "The environment you requested was unavailable." this tends to be swallowed in a wall of text:

...
..................................................................................................................................................................................................................................
cordova-paramedic: Tests failed to complete; ending appium session. The error is:
Error: [init({"name":"travis-plugin-statusbar-246.10","idleTimeout":"100","maxDuration":5400,"platformName":"Android","appPackage":"io.cordova.hellocordova","appActivity":"io.cordova.hellocordova.MainActivity","app":"sauce-storage:gFtyBfaHPfC0qEmVnB6l43H4PEz1EtJA.apk","deviceType":"phone","deviceOrientation":"portrait","appiumVersion":"1.6.4","deviceName":"Android GoogleAPI Emulator","platformVersion":"7.0"})] The environment you requested was unavailable.
    at /tmp/paramedic/node_modules/wd/lib/webdriver.js:140:15
    at Request._callback (/tmp/paramedic/node_modules/wd/lib/http-utils.js:89:7)
    at Request.self.callback (/tmp/paramedic/node_modules/wd/node_modules/request/request.js:186:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/tmp/paramedic/node_modules/wd/node_modules/request/request.js:1163:10)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at IncomingMessage.<anonymous> (/tmp/paramedic/node_modules/wd/node_modules/request/request.js:1085:12)
    at IncomingMessage.g (events.js:260:16)
Completed tests at 11:25:32 AM
Getting saucelabs jobs details...
...

test-ios on recent Xcode version can not select device to run app on

See https://travis-ci.org/apache/cordova-paramedic/jobs/511730014

cordova-paramedic: Choosing Target for iOS
running:
    cordova run --list --emulator --no-telemetry --no-update-notifier | grep ^iPhone | tail -n1
$ cordova run --list --emulator --no-telemetry --no-update-notifier | grep ^iPhone | tail -n1
iPhone-4s, 9.0
running:
    instruments -s devices | grep ^iPhone
$ instruments -s devices | grep ^iPhone
iPhone 4s (8.1) [DC3FBED3-BF97-406B-A548-252CDF6B99FD] (Simulator)
iPhone 4s (8.2) [D80D29A8-08EE-4C95-9868-C12AE1A4D802] (Simulator)
iPhone 4s (8.3) [B4B60E2F-364D-4E20-90C8-DC610C677303] (Simulator)
iPhone 4s (8.4) [47E056C5-C17B-457E-9F43-B0125D47D141] (Simulator)
iPhone 4s (9.0) [B83FD4ED-1C2C-4ED0-B6E4-043EFB11DE96] (Simulator)
iPhone 4s (9.1) [A6946FD9-1B98-49B3-8853-FCAC5F6D9164] (Simulator)
iPhone 4s (9.2) [03D94F0A-70B4-4780-A517-75D71FCCAF21] (Simulator)
iPhone 4s (9.3) [6820495D-90FE-4242-A238-091FF36944B2] (Simulator)
iPhone 5 (10.0) [CA0B6335-CB45-42A2-8301-27534C20F538] (Simulator)
iPhone 5 (10.1) [0E3CA843-A7BC-4912-8EDF-4985E05D0388] (Simulator)
iPhone 5 (10.2) [2362261D-9C99-4127-8DBB-29BB2E742811] (Simulator)
iPhone 5 (10.3.1) [3813DB34-B657-4896-A7B1-DEE28FE087B5] (Simulator)
iPhone 5 (8.1) [A7C7F5B8-0E6B-42E9-BCB5-9EDFE04097CB] (Simulator)
iPhone 5 (8.2) [9A50E578-4354-4431-88A1-E72FD2A49B14] (Simulator)
iPhone 5 (8.3) [2D557633-1640-4839-B217-C72A21448DF3] (Simulator)
iPhone 5 (8.4) [3164D9CB-734E-48F5-93F0-AE8E7F1E6C7F] (Simulator)
iPhone 5 (9.0) [BA763E51-A422-473E-87D4-BB3C73E0F140] (Simulator)
iPhone 5 (9.1) [0B5DA422-C84D-4194-A240-AE5DE7B37CAF] (Simulator)
iPhone 5 (9.2) [0409D723-48BC-44FD-96E8-EE050D417429] (Simulator)
iPhone 5 (9.3) [5BF15B5F-ADC7-43B7-9A17-F523F9E83165] (Simulator)
iPhone 5s (10.0) [2458F2B7-461F-443D-A56A-D4E5C139AD17] (Simulator)
iPhone 5s (10.1) [B6269077-2676-49F4-B616-629B62A12B08] (Simulator)
iPhone 5s (10.2) [25A22D81-20A5-437A-8CA6-A53E61D636F2] (Simulator)
iPhone 5s (10.3.1) [E735557C-CDFD-4456-8C34-AD1C198138A4] (Simulator)
iPhone 5s (11.0.1) [A2886AF8-6D12-4A3E-8B64-1343FA5B1EBD] (Simulator)
iPhone 5s (11.1) [11AE4912-9F6F-4E16-87E1-FF46052D502E] (Simulator)
iPhone 5s (11.2) [7449A9C0-2BD6-426C-94D2-2CA1AFB0B300] (Simulator)
iPhone 5s (11.3) [073DE448-0005-438D-9DEE-A8A4A71874B9] (Simulator)
iPhone 5s (11.4) [BE1F6CE6-03E1-46C7-8940-CE8C81874C34] (Simulator)
iPhone 5s (12.0) [EF6E9887-5AA0-4526-A10F-0CB8FF4A3EC0] (Simulator)
iPhone 5s (12.1) [A47AA654-440F-4A92-9A83-669B55D7B6FE] (Simulator)
iPhone 5s (8.1) [404B1592-529C-4DB7-A620-0A99C7457053] (Simulator)
iPhone 5s (8.2) [66D07948-96CA-427F-8BA4-A7E2F09D5709] (Simulator)
iPhone 5s (8.3) [20C5E82C-F8AE-48DE-BD76-FB8FA4958FED] (Simulator)
iPhone 5s (8.4) [99DEFC8D-8BCE-421F-8AFA-5DB648ADF79B] (Simulator)
iPhone 5s (9.0) [77785DC4-3913-4EBF-B8DE-98230F9F4D74] (Simulator)
iPhone 5s (9.1) [A36780F5-52DB-418A-9F31-0934AF37CE4E] (Simulator)
iPhone 5s (9.2) [52C8454D-6CCB-48A8-AEA3-274875ACAE6D] (Simulator)
iPhone 5s (9.3) [0434ED88-1246-4FFE-960F-763F0C6CC104] (Simulator)
iPhone 6 (10.0) [CA780EEE-980F-417C-8B07-D2DDE2E1BF95] (Simulator)
iPhone 6 (10.1) [18747BDC-E5C8-47BE-B57F-C19F586DC552] (Simulator)
iPhone 6 (10.2) [297DBE95-BE18-4B8B-83DC-1D36C2A33FB5] (Simulator)
iPhone 6 (10.3.1) [55C79AF9-C6BB-4736-A699-B67070ADC65C] (Simulator)
iPhone 6 (11.0.1) [04DADDB3-0174-4D4A-8BFE-C52EBA68AFB6] (Simulator)
iPhone 6 (11.1) [5C10D1E4-3E71-4D9F-935D-C6256E73CE99] (Simulator)
iPhone 6 (11.2) [1D511529-1F72-4446-AEB2-F0F2B7173FC3] (Simulator)
iPhone 6 (11.3) [9AD9927D-AB77-40DD-AAD4-617CCC484187] (Simulator)
iPhone 6 (11.4) [83FFE10E-5295-4526-93D2-A24ECAFEB4A5] (Simulator)
iPhone 6 (12.0) [7D2F9857-A53F-44AD-8DF3-C4123A8E33E2] (Simulator)
iPhone 6 (12.1) [5D33F709-9118-4428-BA36-1C698C79A818] (Simulator)
iPhone 6 (8.1) [5AC6A2C7-E739-4B53-9F4A-3440F06A7BBD] (Simulator)
iPhone 6 (8.2) [70FC34C8-2BFD-4705-892C-26363039E30A] (Simulator)
iPhone 6 (8.3) [D488EA6A-F3C1-40FD-9265-9C1B0EF38151] (Simulator)
iPhone 6 (8.4) [B753AAAE-574B-44F9-BD51-132977545DDD] (Simulator)
iPhone 6 (9.0) [0B96A9A4-7910-4EFA-8981-124E846BAA0D] (Simulator)
iPhone 6 (9.1) [8D30A771-F8A2-4089-A9A9-69156FA64317] (Simulator)
iPhone 6 (9.2) [EBD738A1-8CC7-4B5E-9DFD-D69FCB5ECAEC] (Simulator)
iPhone 6 (9.3) [D77DD3BC-AF88-4E07-AAA8-2ED4166BADDF] (Simulator)
iPhone 6 Plus (10.0) [AE82CB64-F9E2-47E0-B99A-15C0D17C5B07] (Simulator)
iPhone 6 Plus (10.1) [8AB765B4-600D-4A9E-9DA6-317875A37129] (Simulator)
iPhone 6 Plus (10.2) [1C43AE0F-D185-4921-936A-A00BCA9910C5] (Simulator)
iPhone 6 Plus (10.3.1) [46BAB40B-9C4A-4C12-A1E6-40EC4AB49B4B] (Simulator)
iPhone 6 Plus (11.0.1) [4796248F-4CF3-4A36-A799-754584259BCA] (Simulator)
iPhone 6 Plus (11.1) [C1193D41-7E13-4910-A019-ACE4C43C8DE6] (Simulator)
iPhone 6 Plus (11.2) [B9CEF1DF-08A3-4905-8842-A2154F6AA6B7] (Simulator)
iPhone 6 Plus (11.3) [0DC0F901-5CBC-4588-A424-6D3534A6AC70] (Simulator)
iPhone 6 Plus (11.4) [104C9D0D-4416-44CA-A31E-2167AF8157C1] (Simulator)
iPhone 6 Plus (12.0) [D72A590B-08C4-49E2-9100-9CA399F92B6A] (Simulator)
iPhone 6 Plus (12.1) [83683AEC-0AE1-4474-BD1A-F98FD4C0D437] (Simulator)
iPhone 6 Plus (8.1) [8F9B7BE1-263B-4ADD-9AB2-E4AC456DA5A4] (Simulator)
iPhone 6 Plus (8.2) [48D1C240-4708-4C37-A4BB-2B9C7C161461] (Simulator)
iPhone 6 Plus (8.3) [849C0E0C-6355-4CE9-B40E-8DC1A320FA80] (Simulator)
iPhone 6 Plus (8.4) [E2BBA006-12D3-4F76-B142-9C88B2254B27] (Simulator)
iPhone 6 Plus (9.0) [B1C66D25-3022-432E-9D23-02CC5DD85E8F] (Simulator)
iPhone 6 Plus (9.1) [756C27F2-2EA4-4DD1-A8BD-47D5F06717D0] (Simulator)
iPhone 6 Plus (9.2) [5762ACBF-45E5-43EC-8806-C7019EED6F1E] (Simulator)
iPhone 6 Plus (9.3) [B8B8AEF9-9019-4591-9D9E-505440BBAD6E] (Simulator)
iPhone 6s (10.0) [71947550-6FCB-4642-8694-DD6A8E0F4347] (Simulator)
iPhone 6s (10.1) [78B12433-0564-43A6-AE2C-DD1580A29002] (Simulator)
iPhone 6s (10.2) [7715B567-C4F1-4515-95E2-8BC7B6E7F618] (Simulator)
iPhone 6s (10.3.1) [731C8858-1C9F-4240-B319-62F35FF8257B] (Simulator)
iPhone 6s (11.0.1) [31EA4FFF-5D30-4426-A122-65ED712E4906] (Simulator)
iPhone 6s (11.1) [A6566810-0E00-4FDD-B01A-D14CA8793DBA] (Simulator)
iPhone 6s (11.2) [78959D2A-CF56-44A2-9E33-E2BEDD7490C1] (Simulator)
iPhone 6s (11.3) [32264864-1444-45CA-BEE0-5B2E32CF66F4] (Simulator)
iPhone 6s (11.4) [FBC181E1-2E03-4C42-952D-495588757F3A] (Simulator)
iPhone 6s (12.0) [80E2A73C-E843-4C65-87D9-A3E65825B7E8] (Simulator)
iPhone 6s (12.1) [6D5226A9-E0B7-4634-82CF-D22723ED8A44] (Simulator)
iPhone 6s (9.0) [7F420C28-69C3-43CF-9500-85D8B2DC1BB4] (Simulator)
iPhone 6s (9.1) [D24CAECB-1A3D-4F34-A823-F3A68AC39762] (Simulator)
iPhone 6s (9.2) [5DFB6841-6624-4BEF-8232-97A9798F653A] (Simulator)
iPhone 6s (9.3) [64078AA5-41B5-46F8-9CB6-E480CFEA60D3] (Simulator)
iPhone 6s Plus (10.0) [1E59D6FF-753C-460A-97B3-0D7AAB51199C] (Simulator)
iPhone 6s Plus (10.1) [6B39A7BE-0875-4C74-90E2-1C21812EAE02] (Simulator)
iPhone 6s Plus (10.2) [603504EC-CA05-40DA-B847-F6E41F7045D0] (Simulator)
iPhone 6s Plus (10.3.1) [7F198878-F073-4FC4-93F8-53DEC4D43599] (Simulator)
iPhone 6s Plus (11.0.1) [5259E48E-A73B-4842-8FAF-F67AA0FAA3AA] (Simulator)
iPhone 6s Plus (11.1) [3441D55E-D489-46DA-B5E4-67ADC11D226E] (Simulator)
iPhone 6s Plus (11.2) [D382986C-7E64-44A6-A420-1AE0C6112984] (Simulator)
iPhone 6s Plus (11.3) [886F24FF-CFF0-4336-9A15-5F0ADA0263B7] (Simulator)
iPhone 6s Plus (11.4) [590BB894-22F2-4B0A-80D6-5D0A88822829] (Simulator)
iPhone 6s Plus (12.0) [BBC3AC59-B6D1-4FB9-81D1-C823CB630B51] (Simulator)
iPhone 6s Plus (12.1) [32C82BDB-968E-4321-B199-7B9C4A23E9D4] (Simulator)
iPhone 6s Plus (9.0) [828A90FD-8E3A-494C-B7AA-0D6C7EDD8951] (Simulator)
iPhone 6s Plus (9.1) [52F65C13-2998-4FA6-AD1C-F6FCAA7C66F7] (Simulator)
iPhone 6s Plus (9.2) [4D91EEBC-CAAE-4A31-A300-D50EE8A58F12] (Simulator)
iPhone 6s Plus (9.3) [0BFCE262-D146-4366-AF7C-C76F0BC5F484] (Simulator)
iPhone 7 (10.1) [D947E291-A495-4D19-8BB3-C1EFAE9383CD] (Simulator)
iPhone 7 (10.2) [6BD12209-5CE0-465B-A1D1-5A970C278D34] (Simulator)
iPhone 7 (10.3.1) [839D5DB2-32BD-4484-AC84-A75180CF8FB4] (Simulator)
iPhone 7 (11.0.1) [2BB7CA04-1412-430F-B741-49EB90A83738] (Simulator)
iPhone 7 (11.1) [9500D25F-C188-441B-9FBD-B0676E6D86BA] (Simulator)
iPhone 7 (11.2) [40147B0A-E921-4053-8A4D-5D81576650A5] (Simulator)
iPhone 7 (11.3) [56501874-63F5-46C8-AE78-8BE822AC285A] (Simulator)
iPhone 7 (11.4) [BE99653F-DF1A-484F-9B8C-C57F9145E656] (Simulator)
iPhone 7 (12.0) [CE2ECA07-1CD2-4D12-9FFE-1932C0E76050] (Simulator)
iPhone 7 (12.1) [5BE6A0B7-6C28-405C-8059-B763E73FE3BE] (Simulator)
iPhone 7 Plus (10.1) [4EDC0F09-8F44-4DFA-92DA-95CC56ED5AC0] (Simulator)
iPhone 7 Plus (10.2) [770F61E6-1C88-4380-B0B3-AC530913C4E8] (Simulator)
iPhocordova-paramedic: Setting required permissions.
cordova-paramedic: running command cordova run ios --no-telemetry --no-update-notifier --target iPhone-4s --emulator --buildFlag=-UseModernBuildSystem=0
$ cordova run ios --no-telemetry --no-update-notifier --target iPhone-4s --emulator --buildFlag=-UseModernBuildSystem=0
Building for iPhone 4s Simulator
Building project: /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/tmp-3070xXknJbFW8zhX/platforms/ios/HelloCordova.xcworkspace
	Configuration: Debug
	Platform: emulator
Adding xcodebuildArg: -UseModernBuildSystem=0
Running command: xcodebuild -workspace HelloCordova.xcworkspace -scheme HelloCordova -configuration Debug -sdk iphonesimulator -destination platform=iOS Simulator,name=iPhone 4s build CONFIGURATION_BUILD_DIR=/private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/tmp-3070xXknJbFW8zhX/platforms/ios/build/emulator SHARED_PRECOMPS_DIR=/private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/tmp-3070xXknJbFW8zhX/platforms/ios/build/sharedpch -UseModernBuildSystem=0
User defaults from command line:
    UseModernBuildSystem = 0
Build settings from command line:
    CONFIGURATION_BUILD_DIR = /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/tmp-3070xXknJbFW8zhX/platforms/ios/build/emulator
    SDKROOT = iphonesimulator12.1
    SHARED_PRECOMPS_DIR = /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/tmp-3070xXknJbFW8zhX/platforms/ios/build/sharedpch
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
		{ platform:iOS Simulator, OS:latest, name:iPhone 4s }
	Available destinations for the "HelloCordova" scheme:
		{ platform:iOS Simulator, id:8DC340B6-9018-4391-97C0-8515DFF21566, OS:10.3.1, name:iPad (5th generation) }
		{ platform:iOS Simulator, id:0BD2FE16-92B0-4ED9-AFF8-5BBA2A4B558F, OS:11.0.1, name:iPad (5th generation) }
		{ platform:iOS Simulator, id:1BC686AC-E947-431A-A2F8-4A2BCD502C59, OS:11.1, name:iPad (5th generation) }
		{ platform:iOS Simulator, id:740ACA2E-4C12-4F5C-9718-8770D6685F06, OS:11.2, name:iPad (5th generation) }
		{ platform:iOS Simulator, id:E0E7C3D5-400B-4010-8CD9-6E99DDF3FD50, OS:11.3, name:iPad (5th generation) }
		{ platform:iOS Simulator, id:FEE9F8C8-6346-4B31-BFB8-417FB2EC8B57, OS:11.4, name:iPad (5th generation) }
		{ platform:iOS Simulator, id:B9D1F732-E67C-4F14-83FE-D69B2A7589E6, OS:12.0, name:iPad (5th generation) }
		{ platform:iOS Simulator, id:E0C2D7DA-34B7-4AFC-A499-AC36DC5AD72A, OS:12.1, name:iPad (5th generation) }
		{ platform:iOS Simulator, id:04D32794-C9FC-45AE-9495-66579D530C76, OS:12.0, name:iPad (6th generation) }
		{ platform:iOS Simulator, id:9874F2D5-3242-47B1-99B2-6FAE012748DC, OS:12.1, name:iPad (6th generation) }
		{ platform:iOS Simulator, id:E5DE4CFE-16E3-4B41-8619-D41CC49F6117, OS:10.0, name:iPad Air }
		{ platform:iOS Simulator, id:5C873AC5-01D3-4202-A5AD-CAF2F44E079F, OS:10.1, name:iPad Air }
		{ platform:iOS Simulator, id:5532AF4E-2308-4D77-AD32-653376103DB9, OS:10.2, name:iPad Air }
		{ platform:iOS Simulator, id:44B5EE13-752B-4C94-B8BE-28FA32BBE5B1, OS:10.3.1, name:iPad Air }
		{ platform:iOS Simulator, id:A512FCC6-C782-48EF-B70B-B0BD578E22D7, OS:11.0.1, name:iPad Air }
		{ platform:iOS Simulator, id:C8FCA8B5-EC06-4F44-BBBC-6943D400FB38, OS:11.1, name:iPad Air }
		{ platform:iOS Simulator, id:818C0546-9A03-45B5-802F-84AF5605EC8A, OS:11.2, name:iPad Air }
		{ platform:iOS Simulator, id:D4F056C5-9A16-46C4-BA50-730482ADBFD9, OS:11.3, name:iPad Air }
		{ platform:iOS Simulator, id:D5EE32DC-ABBA-4B17-8C51-3243AC4B58EA, OS:11.4, name:iPad Air }
		{ platform:iOS Simulator, id:A93BE657-8650-42C3-BB3B-AC891E150CD2, OS:12.0, name:iPad Air }
		{ platform:iOS Simulator, id:19C99887-458D-4EE0-A7FD-ADD3370CCBEF, OS:12.1, name:iPad Air }
		{ platform:iOS Simulator, id:EF6FF487-4F18-4111-A340-BD32B2064266, OS:10.0, name:iPad Air 2 }
		{ platform:iOS Simulator, id:2F706051-73FD-4068-93E0-90C3B386C2BE, OS:10.1, name:iPad Air 2 }
		{ platform:iOS Simulator, id:18F1A604-C9FC-4823-B056-9A6AE861720F, OS:10.2, name:iPad Air 2 }
		{ platform:iOS Simulator, id:C7F6FFE4-3571-4B85-B30C-E3540321BF76, OS:10.3.1, name:iPad Air 2 }
		{ platform:iOS Simulator, id:E69E6D5D-44C4-4740-940A-886F9412EB93, OS:11.0.1, name:iPad Air 2 }
		{ platform:iOS Simulator, id:304C00A9-57E6-4A6A-9A6D-F717E3C5CFA1, OS:11.1, name:iPad Air 2 }
		{ platform:iOS Simulator, id:0204184E-7FCF-430E-8BA7-32E299341291, OS:11.2, name:iPad Air 2 }
		{ platform:iOS Simulator, id:8D2C7E57-019E-4F1F-A816-363B598004A1, OS:11.3, name:iPad Air 2 }
		{ platform:iOS Simulator, id:5C5764F4-80A1-4AF4-829A-88B328560A30, OS:11.4, name:iPad Air 2 }
		{ platform:iOS Simulator, id:CF022D78-65D4-4AD7-ACF3-DEA64368161C, OS:12.0, name:iPad Air 2 }
		{ platform:iOS Simulator, id:B5E3DADA-18DB-48C5-916C-6AC59CD5E70B, OS:12.1, name:iPad Air 2 }
		{ platform:iOS Simulator, id:2589ED2C-F616-44BB-BC31-0545BC4AB68B, OS:10.0, name:iPad Pro (9.7 inch) }
		{ platform:iOS Simulator, id:E21B9994-37AF-4593-8A0A-46A5E316DE24, OS:10.1, name:iPad Pro (9.7 inch) }
		{ platform:iOS Simulator, id:DD89206E-3E6D-4FD9-AA1F-F791A334D917, OS:10.2, name:iPad Pro (9.7 inch) }
		{ platform:iOS Simulator, id:C3BBCA23-5F6D-4F69-8FBD-34695EE021F4, OS:10.3.1, name:iPad Pro (9.7 inch) }
		{ platform:iOS Simulator, id:330A9CAE-7BEE-410E-AADD-3E33C6FBF668, OS:11.0.1, name:iPad Pro (9.7-inch) }
		{ platform:iOS Simulator, id:9FD18EDF-64AE-4A0C-9F8F-7F6F961752D6, OS:11.1, name:iPad Pro (9.7-inch) }
		{ platform:iOS Simulator, id:A69CB9E6-42D9-4E41-894B-575F087E88CA, OS:11.2, name:iPad Pro (9.7-inch) }
		{ platform:iOS Simulator, id:86BCF9D6-28EF-4EA3-8233-213C0C5F7A75, OS:11.3, name:iPad Pro (9.7-inch) }
		{ platform:iOS Simulator, id:B5907DE3-6EB0-412D-A496-F3850358E507, OS:11.4, name:iPad Pro (9.7-inch) }
		{ platform:iOS Simulator, id:55E8F070-E4FE-4E5D-9552-4C020BA34CBD, OS:12.0, name:iPad Pro (9.7-inch) }
		{ platform:iOS Simulator, id:0483DFB6-D3D0-4902-A657-48208D3CB7D9, OS:12.1, name:iPad Pro (9.7-inch) }
		{ platform:iOS Simulator, id:4B9DED5C-A660-49BD-BF4B-54DC343ADC74, OS:10.3.1, name:iPad Pro (10.5-inch) }
		{ platform:iOS Simulator, id:367792A1-681A-4B8E-8BBB-6D2D7584CBF4, OS:11.0.1, name:iPad Pro (10.5-inch) }
		{ platform:iOS Simulator, id:B2889C68-418B-4771-A3C6-54AB5210DF15, OS:11.1, name:iPad Pro (10.5-inch) }
		{ platform:iOS Simulator, id:998BB428-F11B-41C2-B6D3-083B48AB3FB3, OS:11.2, name:iPad Pro (10.5-inch) }
		{ platform:iOS Simulator, id:290FE650-0EB5-4F08-9653-46BBEC1B71DB, OS:11.3, name:iPad Pro (10.5-inch) }
		{ platform:iOS Simulator, id:C339A636-603E-425D-82B2-6FD8A064D2E6, OS:11.4, name:iPad Pro (10.5-inch) }
		{ platform:iOS Simulator, id:7721DEDF-CC5B-48B3-9E19-C37DBCD9B0EC, OS:12.0, name:iPad Pro (10.5-inch) }
		{ platform:iOS Simulator, id:B21A55BB-178D-4C3A-B4B2-692F7DA94C02, OS:12.1, name:iPad Pro (10.5-inch) }
		{ platform:iOS Simulator, id:95E5F6BE-652D-4DBB-ADEF-BEDDAABD1C3A, OS:12.1, name:iPad Pro (11-inch) }
		{ platform:iOS Simulator, id:4BE46463-5636-4EB7-967A-FA644D6EB479, OS:10.0, name:iPad Pro (12.9 inch) }
		{ platform:iOS Simulator, id:A3F91975-DB05-42FD-96F6-4F15E4BF3E60, OS:10.1, name:iPad Pro (12.9 inch) }
		{ platform:iOS Simulator, id:34C06381-9D27-4FCD-811D-067C0685F1C4, OS:10.2, name:iPad Pro (12.9 inch) }
		{ platform:iOS Simulator, id:633A6883-8C24-4399-95F8-5A3BBFCA6B6B, OS:10.3.1, name:iPad Pro (12.9 inch) }
		{ platform:iOS Simulator, id:E1F1E879-1645-4487-BD60-B9AE5432F9A8, OS:11.0.1, name:iPad Pro (12.9-inch) }
		{ platform:iOS Simulator, id:AC183552-C9C2-4F0D-8F92-4478AA0D7F55, OS:11.1, name:iPad Pro (12.9-inch) }
		{ platform:iOS Simulator, id:0655A6CB-B48B-4909-BEF5-A0DDAE70699E, OS:11.2, name:iPad Pro (12.9-inch) }
		{ platform:iOS Simulator, id:9591346E-F504-471A-A926-2727B316915E, OS:11.3, name:iPad Pro (12.9-inch) }
		{ platform:iOS Simulator, id:1B42C6C9-B315-41CF-AC84-0B4B29704F6A, OS:11.4, name:iPad Pro (12.9-inch) }
		{ platform:iOS Simulator, id:A7DDC7E5-4013-448F-9D50-AA4E5F5F86F1, OS:12.0, name:iPad Pro (12.9-inch) }
		{ platform:iOS Simulator, id:CD364B50-5288-4346-8CE5-0280400FAAE8, OS:12.1, name:iPad Pro (12.9-inch) }
		{ platform:iOS Simulator, id:C31BDE52-77E7-4D3B-8EC8-7CA8F7334BBC, OS:10.3.1, name:iPad Pro (12.9-inch) (2nd generation) }
		{ platform:iOS Simulator, id:C59DB55B-B14A-4F3F-AFDA-8CB1225A74EA, OS:11.0.1, name:iPad Pro (12.9-inch) (2nd generation) }
		{ platform:iOS Simulator, id:F29F3BF9-E646-4ECB-A423-183567762B7B, OS:11.1, name:iPad Pro (12.9-inch) (2nd generation) }
		{ platform:iOS Simulator, id:BF968D2D-C301-4AEB-A99A-ED4EE72773E3, OS:11.2, name:iPad Pro (12.9-inch) (2nd generation) }
		{ platform:iOS Simulator, id:06837A44-3A14-40ED-B70F-B7E1361815A6, OS:11.3, name:iPad Pro (12.9-inch) (2nd generation) }
		{ platform:iOS Simulator, id:96BB688E-0F5F-4C88-BEA5-860DF0FAC194, OS:11.4, name:iPad Pro (12.9-inch) (2nd generation) }
		{ platform:iOS Simulator, id:17AB2612-C90E-48E3-8109-8101D6B60F7C, OS:12.0, name:iPad Pro (12.9-inch) (2nd generation) }
		{ platform:iOS Simulator, id:974FD6C4-2326-4163-A924-C4AC412E1112, OS:12.1, name:iPad Pro (12.9-inch) (2nd generation) }
		{ platform:iOS Simulator, id:2CE7B5F1-453E-4776-A551-F8AE61234E8F, OS:12.1, name:iPad Pro (12.9-inch) (3rd generation) }
		{ platform:iOS Simulator, id:CA0B6335-CB45-42A2-8301-27534C20F538, OS:10.0, name:iPhone 5 }
		{ platform:iOS Simulator, id:0E3CA843-A7BC-4912-8EDF-4985E05D0388, OS:10.1, name:iPhone 5 }
		{ platform:iOS Simulator, id:2362261D-9C99-4127-8DBB-29BB2E742811, OS:10.2, name:iPhone 5 }
		{ platform:iOS Simulator, id:3813DB34-B657-4896-A7B1-DEE28FE087B5, OS:10.3.1, name:iPhone 5 }
		{ platform:iOS Simulator, id:2458F2B7-461F-443D-A56A-D4E5C139AD17, OS:10.0, name:iPhone 5s }
		{ platform:iOS Simulator, id:B6269077-2676-49F4-B616-629B62A12B08, OS:10.1, name:iPhone 5s }
		{ platform:iOS Simulator, id:25A22D81-20A5-437A-8CA6-A53E61D636F2, OS:10.2, name:iPhone 5s }
		{ platform:iOS Simulator, id:E735557C-CDFD-4456-8C34-AD1C198138A4, OS:10.3.1, name:iPhone 5s }
		{ platform:iOS Simulator, id:A2886AF8-6D12-4A3E-8B64-1343FA5B1EBD, OS:11.0.1, name:iPhone 5s }
		{ platform:iOS Simulator, id:11AE4912-9F6F-4E16-87E1-FF46052D502E, OS:11.1, name:iPhone 5s }
		{ platform:iOS Simulator, id:7449A9C0-2BD6-426C-94D2-2CA1AFB0B300, OS:11.2, name:iPhone 5s }
		{ platform:iOS Simulator, id:073DE448-0005-438D-9DEE-A8A4A71874B9, OS:11.3, name:iPhone 5s }
		{ platform:iOS Simulator, id:BE1F6CE6-03E1-46C7-8940-CE8C81874C34, OS:11.4, name:iPhone 5s }
		{ platform:iOS Simulator, id:EF6E9887-5AA0-4526-A10F-0CB8FF4A3EC0, OS:12.0, name:iPhone 5s }
		{ platform:iOS Simulator, id:A47AA654-440F-4A92-9A83-669B55D7B6FE, OS:12.1, name:iPhone 5s }
		{ platform:iOS Simulator, id:CA780EEE-980F-417C-8B07-D2DDE2E1BF95, OS:10.0, name:iPhone 6 }
		{ platform:iOS Simulator, id:18747BDC-E5C8-47BE-B57F-C19F586DC552, OS:10.1, name:iPhone 6 }
		{ platform:iOS Simulator, id:297DBE95-BE18-4B8B-83DC-1D36C2A33FB5, OS:10.2, name:iPhone 6 }
		{ platform:iOS Simulator, id:55C79AF9-C6BB-4736-A699-B67070ADC65C, OS:10.3.1, name:iPhone 6 }
		{ platform:iOS Simulator, id:04DADDB3-0174-4D4A-8BFE-C52EBA68AFB6, OS:11.0.1, name:iPhone 6 }
		{ platform:iOS Simulator, id:5C10D1E4-3E71-4D9F-935D-C6256E73CE99, OS:11.1, name:iPhone 6 }
		{ platform:iOS Simulator, id:1D511529-1F72-4446-AEB2-F0F2B7173FC3, OS:11.2, name:iPhone 6 }
		{ platform:iOS Simulator, id:9AD9927D-AB77-40DD-AAD4-617CCC484187, OS:11.3, name:iPhone 6 }
		{ platform:iOS Simulator, id:83FFE10E-5295-4526-93D2-A24ECAFEB4A5, OS:11.4, name:iPhone 6 }
		{ platform:iOS Simulator, id:7D2F9857-A53F-44AD-8DF3-C4123A8E33E2, OS:12.0, name:iPhone 6 }
		{ platform:iOS Simulator, id:5D33F709-9118-4428-BA36-1C698C79A818, OS:12.1, name:iPhone 6 }
		{ platform:iOS Simulator, id:AE82CB64-F9E2-47E0-B99A-15C0D17C5B07, OS:10.0, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:8AB765B4-600D-4A9E-9DA6-317875A37129, OS:10.1, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:1C43AE0F-D185-4921-936A-A00BCA9910C5, OS:10.2, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:46BAB40B-9C4A-4C12-A1E6-40EC4AB49B4B, OS:10.3.1, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:4796248F-4CF3-4A36-A799-754584259BCA, OS:11.0.1, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:C1193D41-7E13-4910-A019-ACE4C43C8DE6, OS:11.1, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:B9CEF1DF-08A3-4905-8842-A2154F6AA6B7, OS:11.2, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:0DC0F901-5CBC-4588-A424-6D3534A6AC70, OS:11.3, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:104C9D0D-4416-44CA-A31E-2167AF8157C1, OS:11.4, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:D72A590B-08C4-49E2-9100-9CA399F92B6A, OS:12.0, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:83683AEC-0AE1-4474-BD1A-F98FD4C0D437, OS:12.1, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:71947550-6FCB-4642-8694-DD6A8E0F4347, OS:10.0, name:iPhone 6s }
		{ platform:iOS Simulator, id:78B12433-0564-43A6-AE2C-DD1580A29002, OS:10.1, name:iPhone 6s }
		{ platform:iOS Simulator, id:7715B567-C4F1-4515-95E2-8BC7B6E7F618, OS:10.2, name:iPhone 6s }
		{ platform:iOS Simulator, id:731C8858-1C9F-4240-B319-62F35FF8257B, OS:10.3.1, name:iPhone 6s }
		{ platform:iOS Simulator, id:31EA4FFF-5D30-4426-A122-65ED712E4906, OS:11.0.1, name:iPhone 6s }
		{ platform:iOS Simulator, id:A6566810-0E00-4FDD-B01A-D14CA8793DBA, OS:11.1, name:iPhone 6s }
		{ platform:iOS Simulator, id:78959D2A-CF56-44A2-9E33-E2BEDD7490C1, OS:11.2, name:iPhone 6s }
		{ platform:iOS Simulator, id:32264864-1444-45CA-BEE0-5B2E32CF66F4, OS:11.3, name:iPhone 6s }
		{ platform:iOS Simulator, id:FBC181E1-2E03-4C42-952D-495588757F3A, OS:11.4, name:iPhone 6s }
		{ platform:iOS Simulator, id:80E2A73C-E843-4C65-87D9-A3E65825B7E8, OS:12.0, name:iPhone 6s }
		{ platform:iOS Simulator, id:6D5226A9-E0B7-4634-82CF-D22723ED8A44, OS:12.1, name:iPhone 6s }
		{ platform:iOS Simulator, id:1E59D6FF-753C-460A-97B3-0D7AAB51199C, OS:10.0, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:6B39A7BE-0875-4C74-90E2-1C21812EAE02, OS:10.1, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:603504EC-CA05-40DA-B847-F6E41F7045D0, OS:10.2, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:7F198878-F073-4FC4-93F8-53DEC4D43599, OS:10.3.1, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:5259E48E-A73B-4842-8FAF-F67AA0FAA3AA, OS:11.0.1, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:3441D55E-D489-46DA-B5E4-67ADC11D226E, OS:11.1, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:D382986C-7E64-44A6-A420-1AE0C6112984, OS:11.2, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:886F24FF-CFF0-4336-9A15-5F0ADA0263B7, OS:11.3, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:590BB894-22F2-4B0A-80D6-5D0A88822829, OS:11.4, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:BBC3AC59-B6D1-4FB9-81D1-C823CB630B51, OS:12.0, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:32C82BDB-968E-4321-B199-7B9C4A23E9D4, OS:12.1, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:D947E291-A495-4D19-8BB3-C1EFAE9383CD, OS:10.1, name:iPhone 7 }
		{ platform:iOS Simulator, id:6BD12209-5CE0-465B-A1D1-5A970C278D34, OS:10.2, name:iPhone 7 }
		{ platform:iOS Simulator, id:839D5DB2-32BD-4484-AC84-A75180CF8FB4, OS:10.3.1, name:iPhone 7 }
		{ platform:iOS Simulator, id:2BB7CA04-1412-430F-B741-49EB90A83738, OS:11.0.1, name:iPhone 7 }
		{ platform:iOS Simulator, id:9500D25F-C188-441B-9FBD-B0676E6D86BA, OS:11.1, name:iPhone 7 }
		{ platform:iOS Simulator, id:40147B0A-E921-4053-8A4D-5D81576650A5, OS:11.2, name:iPhone 7 }
		{ platform:iOS Simulator, id:56501874-63F5-46C8-AE78-8BE822AC285A, OS:11.3, name:iPhone 7 }
		{ platform:iOS Simulator, id:BE99653F-DF1A-484F-9B8C-C57F9145E656, OS:11.4, name:iPhone 7 }
		{ platform:iOS Simulator, id:CE2ECA07-1CD2-4D12-9FFE-1932C0E76050, OS:12.0, name:iPhone 7 }
		{ platform:iOS Simulator, id:5BE6A0B7-6C28-405C-8059-B763E73FE3BE, OS:12.1, name:iPhone 7 }
		{ platform:iOS Simulator, id:4EDC0F09-8F44-4DFA-92DA-95CC56ED5AC0, OS:10.1, name:iPhone 7 Plus }
		{ platform:iOS Simulator, id:770F61E6-1C88-4380-B0B3-AC530913C4E8, OS:10.2, name:iPhone 7 Plus }
		{ platform:iOS Simulator, id:C49E25B4-FFD7-4FDD-BC15-5E59EF29D352, OS:10.3.1, name:iPhone 7 Plus }
		{ platform:iOS Simulator, id:363D5A96-AB89-4DEA-94B4-0163AE8CFB6C, OS:11.0.1, name:iPhone 7 Plus }
		{ platform:iOS Simulator, id:44D931DF-4B79-4DFD-AAEB-71856F825E6B, OS:11.1, name:iPhone 7 Plus }
		{ platform:iOS Simulator, id:8C9C87BA-E044-4477-BEBC-C874ECDEA192, OS:11.2, name:iPhone 7 Plus }
		{ platform:iOS Simulator, id:87049B88-2D91-485B-BD77-64F165FF1C18, OS:11.3, name:iPhone 7 Plus }
		{ platform:iOS Simulator, id:F3A51F3F-7706-4220-AA88-A8386406B931, OS:11.4, name:iPhone 7 Plus }
		{ platform:iOS Simulator, id:4F78D342-658F-4F69-A501-630D518B9189, OS:12.0, name:iPhone 7 Plus }
		{ platform:iOS Simulator, id:8A581FB6-8FE4-4555-AF4F-2F11A4CB18A5, OS:12.1, name:iPhone 7 Plus }
		{ platform:iOS Simulator, id:F314EE3A-61A0-4E03-A64B-13B3A33587C1, OS:11.0.1, name:iPhone 8 }
		{ platform:iOS Simulator, id:50DBA924-1912-4B76-A950-B9ECDCC4FF26, OS:11.1, name:iPhone 8 }
		{ platform:iOS Simulator, id:066FDAED-2FDF-448A-96B8-31CBB8AE40A3, OS:11.2, name:iPhone 8 }
		{ platform:iOS Simulator, id:6A8AC1E0-7154-432C-9CE4-D9CBAA356A60, OS:11.3, name:iPhone 8 }
		{ platform:iOS Simulator, id:D6E41B94-1BD3-45F8-B478-530FDE38E6B0, OS:11.4, name:iPhone 8 }
		{ platform:iOS Simulator, id:291F3B95-2455-465D-964F-087EF3300AC7, OS:12.0, name:iPhone 8 }
		{ platform:iOS Simulator, id:ADFB69A9-BD7C-45E7-BEBA-6E438C39952C, OS:12.1, name:iPhone 8 }
		{ platform:iOS Simulator, id:33F48089-3B0A-4EE2-ADED-67D8C33ED5BB, OS:11.0.1, name:iPhone 8 Plus }
		{ platform:iOS Simulator, id:17DED1AC-70A5-4CAC-BDC2-6DE36A7AB5A2, OS:11.1, name:iPhone 8 Plus }
		{ platform:iOS Simulator, id:3A6DF07F-658B-484F-9581-40131BE2A4A0, OS:11.2, name:iPhone 8 Plus }
		{ platform:iOS Simulator, id:35E8BB59-6194-49A1-BF41-D0DA11E95F7B, OS:11.3, name:iPhone 8 Plus }
		{ platform:iOS Simulator, id:A88A832F-0763-4853-ABB2-7EE2B2DC7637, OS:11.4, name:iPhone 8 Plus }
		{ platform:iOS Simulator, id:7165E589-14BC-44BB-88FF-9616C698D330, OS:12.0, name:iPhone 8 Plus }
		{ platform:iOS Simulator, id:66BEEFF0-D922-4C16-A4D9-21FC5DA28462, OS:12.1, name:iPhone 8 Plus }
		{ platform:iOS Simulator, id:A52510B3-A8D5-4EBB-8DB2-FE380C4DA0AA, OS:10.0, name:iPhone SE }
		{ platform:iOS Simulator, id:AAE9E702-99E0-4C91-A689-6C440BA3F32A, OS:10.1, name:iPhone SE }
		{ platform:iOS Simulator, id:90430374-1625-4B9B-A852-1D07D819B747, OS:10.2, name:iPhone SE }
		{ platform:iOS Simulator, id:616CD9B0-8885-4C43-B0E2-50F5F7B1C480, OS:10.3.1, name:iPhone SE }
		{ platform:iOS Simulator, id:014E5388-315E-4EEC-8267-453239F9906F, OS:11.0.1, name:iPhone SE }
		{ platform:iOS Simulator, id:633274D7-8453-47CD-A0DC-7D3E5434FE3E, OS:11.1, name:iPhone SE }
		{ platform:iOS Simulator, id:DFB8A518-ACBE-4E1E-9B9C-2B11A89810EB, OS:11.2, name:iPhone SE }
		{ platform:iOS Simulator, id:30D22540-2584-4755-B84F-5D8556460FD4, OS:11.3, name:iPhone SE }
		{ platform:iOS Simulator, id:A89C0B76-9454-47BE-9516-D785E6C0D715, OS:11.4, name:iPhone SE }
		{ platform:iOS Simulator, id:D234CF8F-0D96-49B0-9C8C-C9F4FF5569B9, OS:12.0, name:iPhone SE }
		{ platform:iOS Simulator, id:860CB8B0-7E02-4EA5-A088-FC942727B2A7, OS:12.1, name:iPhone SE }
		{ platform:iOS Simulator, id:70A71466-A7C4-4B29-B3A3-1B360AE9EAC6, OS:11.0.1, name:iPhone X }
		{ platform:iOS Simulator, id:1A15CA03-24BC-4263-9417-FDF81BAA7E02, OS:11.1, name:iPhone X }
		{ platform:iOS Simulator, id:A2BDE8DA-7D18-49D1-8A3C-C30291594B2D, OS:11.2, name:iPhone X }
		{ platform:iOS Simulator, id:F706590F-FF96-4D79-80B8-F41319C65DF8, OS:11.3, name:iPhone X }
		{ platform:iOS Simulator, id:C56AE1A4-7667-4AA5-924A-1414896E9C80, OS:11.4, name:iPhone X }
		{ platform:iOS Simulator, id:6F17A6EA-29EC-4646-B6B4-84FF3D4FD589, OS:12.0, name:iPhone X }
		{ platform:iOS Simulator, id:DFAF4EF2-9DFF-47E7-A70E-08474E6AF89F, OS:12.1, name:iPhone X }
		{ platform:iOS Simulator, id:9948FFF0-824A-4453-8E68-88883A89B835, OS:12.0, name:iPhone XR }
		{ platform:iOS Simulator, id:EF83C8B4-4FB2-4CDE-AA99-5D58F2860A8B, OS:12.1, name:iPhone XR }
		{ platform:iOS Simulator, id:C97BEF15-53F3-4964-82A5-7020FC27CFB4, OS:12.0, name:iPhone XS }
		{ platform:iOS Simulator, id:B40F7090-26EE-4D2E-A7A2-C13E10EDA669, OS:12.1, name:iPhone XS }
		{ platform:iOS Simulator, id:445B43AB-B829-4C8E-AA7D-0216EF591C0D, OS:12.0, name:iPhone XS Max }
		{ platform:iOS Simulator, id:193146CD-70CE-4881-828B-A34C3EEC0FAF, OS:12.1, name:iPhone XS Max }
	Ineligible destinations for the "HelloCordova" scheme:
		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
		{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }
xcodebuild: Command failed with exit code 70

So first it selects an iPhone 4S to build for, but later can't run/emulate on that device as it is not available.

Paramedic is trying to kill `chrome.exe` when running configuration `browser-firefox`

Plugin: cordova-plugin-device
Command executed: cordova-paramedic --config pr\browser-firefox --plugin .

λ cordova-paramedic --config pr\browser-firefox --plugin .
cordova-paramedic: looking for a config here: C:\Projects\Cordova\cordova-plugin-device\pr\browser-firefox
cordova-paramedic: looking for a config here: C:\nvm\v10.12.0\node_modules\cordova-paramedic\conf\pr\browser-firefox.config.json
cordova-paramedic: Will use the following cli: cordova
(node:33464) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
cordova-paramedic: creating temp project at C:\Users\Jan\AppData\Local\Temp\tmp-33464D5F1e4As2R13
Creating a new cordova project.
C:\Users\Jan\AppData\Local\Temp\tmp-33464D5F1e4As2R13 C:\Projects\Cordova\cordova-plugin-device
cordova-paramedic: installing plugins
cordova-paramedic: installing C:\Projects\Cordova\cordova-plugin-device --no-telemetry --no-update-notifier
Adding cordova-plugin-device to package.json
Saved plugin info for "cordova-plugin-device" to config.xml
cordova-paramedic: installing C:\Users\Jan\AppData\Local\Temp\tmp-33464D5F1e4As2R13\plugins\cordova-plugin-device\tests --no-telemetry --no-update-notifier
Adding cordova-plugin-device-tests to package.json
Saved plugin info for "cordova-plugin-device-tests" to config.xml
cordova-plugin-device 2.0.3-dev "Device"
cordova-plugin-device-tests 2.0.3-dev "Cordova Device Plugin Tests"
cordova-paramedic: installing cordova-plugin-test-framework --no-telemetry --no-update-notifier
Adding cordova-plugin-test-framework to package.json
Saved plugin info for "cordova-plugin-test-framework" to config.xml
cordova-paramedic: installing C:\nvm\v10.12.0\node_modules\cordova-paramedic\paramedic-plugin --no-telemetry --no-update-notifier
Adding cordova-plugin-paramedic to package.json
Saved plugin info for "cordova-plugin-paramedic" to config.xml
cordova-paramedic: setting app start page to test page
cordova-paramedic: adding platform browser( --no-telemetry --no-update-notifier)
Using cordova-fetch for cordova-browser@~5.0.1
Adding browser project...
Creating Cordova project for cordova-browser:
        Path: C:\Users\Jan\AppData\Local\Temp\tmp-33464D5F1e4As2R13\platforms\browser
        Name: HelloCordova
Installing "cordova-plugin-device" for browser
Installing "cordova-plugin-device-tests" for browser
Installing "cordova-plugin-paramedic" for browser
Installing "cordova-plugin-test-framework" for browser
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Installing "cordova-plugin-whitelist" for browser
Adding cordova-plugin-whitelist to package.json
Saved plugin info for "cordova-plugin-whitelist" to config.xml
--save flag or autosave detected
Saving browser@~5.0.4 into config.xml file ...
cordova-paramedic: successfully finished adding platform browser
local-server: scanning ports from 7008 to 7208
local-server: port 7101 is available
local-server: starting local medic server
cordova-paramedic: writing medic log url to project http://127.0.0.1:7101
Start running tests at 6:29:36 PM
cordova-paramedic: running command cordova run browser --no-telemetry --no-update-notifier
cordova-paramedic: waiting for test results
local-server: new socket connection
cordova-paramedic: Device info: {"available":true,"platform":"browser","version":"63.0","uuid":null,"cordova":"5.0.4","model":"Firefox","manufacturer":"unknown","isVirtual":false,"serial":"unknown"}
Spec started

  1 cordova-plugin-device-tests.tests >>

    1.1 Device Information (window.device)
      √ should exist
      √ should contain a platform specification that is a string
      √ should contain a version specification that is a string
      √ should contain a UUID specification that is a string or a number
      √ should contain a cordova specification that is a string
      √ should depend on the presence of cordova.version string
      √ should contain device.cordova equal to cordova.version
      √ should contain a model specification that is a string
      √ should contain a manufacturer property that is a string
      √ should contain an isVirtual property that is a boolean
      √ should contain a serial number specification that is a string

Executed 11 of 11 specs SUCCESS in 0.077 sec.
cordova-paramedic: tests have been completed
Unsupported platform for Appium test run: browser
Completed tests at 6:29:42 PM
Collecting logs for the devices.
Logging is unsupported for browser, skipping...
Uninstalling the app.
cordova-paramedic: Killing the emulator process.
running the following command:
    taskkill /t /F /IM "chrome.exe"
ERROR: The process "chrome.exe" not found.
WARNING: kill command returned 128
local-server: killing local file transfer server if it's up...
cordova-paramedic: Deleting the application: C:\Users\Jan\AppData\Local\Temp\tmp-33464D5F1e4As2R13
C:\Projects\Cordova\cordova-plugin-device
Finished with exit code 0

C:\Projects\Cordova\cordova-plugin-device (master -> origin) ([email protected])
λ

Where should I run the ios test?

I am new to Cordova and I want to know more about the test process.
I found this https://kerrishotts.github.io/pgday/workshops/2017/campp/testing.html#cordova-paramedic, in which some steps are provided to test a plugin.

I am still confused that where should I start the test. In the tests dir or in the root dir of plugin ? Or somewhere else? I assume that I will have to run the test in tests dir. But it failed with Failed to install plugin : tests. So I am confused now.

Please help me with this. Thanks.

Testing plugins need package.json

(node 10.10 on Windows)

cordova-paramedic: installing plugins
cordova-paramedic: installing C:\Projects\Cordova\cordova-paramedic\spec\testable-plugin --no-telemetry --no-update-notifier
Invalid Plugin! C:\Projects\Cordova\cordova-paramedic\spec\testable-plugin needs a valid package.json
Error: Failed to install plugin : C:\Projects\Cordova\cordova-paramedic\spec\testable-plugin --no-telemetry --no-update-notifier
Completed tests at 8:34:54 PM
Collecting logs for the devices.
It looks like there is no target to get logs from.
Uninstalling the app.
Error: Failed to install plugin : C:\Projects\Cordova\cordova-paramedic\spec\testable-plugin --no-telemetry --no-update-notifier
    at PluginsManager.installSinglePlugin (C:\Projects\Cordova\cordova-paramedic\lib\PluginsManager.js:85:15)
    at PluginsManager.installPlugins (C:\Projects\Cordova\cordova-paramedic\lib\PluginsManager.js:37:14)
    at ParamedicRunner.installPlugins (C:\Projects\Cordova\cordova-paramedic\lib\paramedic.js:158:25)
    at ParamedicRunner.prepareProjectToRunTests (C:\Projects\Cordova\cordova-paramedic\lib\paramedic.js:147:10)
    at C:\Projects\Cordova\cordova-paramedic\lib\paramedic.js:75:21
    at _fulfilled (C:\Projects\Cordova\cordova-paramedic\node_modules\q\q.js:854:54)
    at C:\Projects\Cordova\cordova-paramedic\node_modules\q\q.js:883:30
    at Promise.promise.promiseDispatch (C:\Projects\Cordova\cordova-paramedic\node_modules\q\q.js:816:13)
    at C:\Projects\Cordova\cordova-paramedic\node_modules\q\q.js:877:14
    at runSingle (C:\Projects\Cordova\cordova-paramedic\node_modules\q\q.js:137:13)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test-ios: `node main.js --platform ios --plugin ./spec/testable-plugin/ --verbose`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test-ios script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Plugins in /spec are all missing a package.json file.

`npm t` assumes we are on macOS - why?

  "scripts": {
    "test": "npm run jshint & npm run test-ios",
    "jshint": "node node_modules/jshint/bin/jshint lib/",
    "test-appveyor": "npm run test-windows",
    "test-travis": "npm run test-ios",
    "test-android": "node main.js --platform android --plugin ./spec/testable-plugin/",
    "test-ios": "node main.js --platform ios --plugin ./spec/testable-plugin/ --verbose",
    "test-windows": "node main.js --platform windows --plugin ./spec/testable-plugin/",
    "test-wp8": "node main.js --platform wp8 --plugin ./spec/testable-plugin/"
  },

Just historical or convenience - or specific reason behind that?

Error when testing Camera Plugin with AppVeyor

Bug Report

Problem

What is expected to happen?

The test successfully passes when testing Cordova plugins with the paramedic on AppVeyor.

What does actually happen?

Error when building and running a paramedic tests on cordova-camera-plugin with AppVeyor.

Getting the following error.

Installing "debug-mode-plugin" for windows
Failed to install 'debug-mode-plugin': CordovaError: Using "requireCordovaModule" to load non-cordova module "shelljs" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
    at Context.requireCordovaModule (C:\Users\appveyor\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\Context.js:57:15)
    at module.exports (C:\Users\appveyor\AppData\Local\Temp\1\tmp-4764dEiLlwr7DFpu\plugins\debug-mode-plugin\scripts\enable-debug-mode.js:22:25)
    at runScriptViaModuleLoader (C:\Users\appveyor\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:181:32)
    at runScript (C:\Users\appveyor\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:157:16)
    at C:\Users\appveyor\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:125:20
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
Using "requireCordovaModule" to load non-cordova module "shelljs" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.

I believe, this is because in the cordova-paramedic/debug-mode-plugin/scripts/disable-debug-mode.js and cordova-paramedic/debug-mode-plugin/scripts/enable-debug-mode.js we load shelljs using context.requireCordovaModule. This modules actually lives in the cordova-lib/src/hoos/Context.js and this is where this error is coming from.

    if (!pkg.match(/^cordova-[^/]+/)) {
        events.emit('warn',
            `Using "requireCordovaModule" to load non-cordova module ` +
            `"${modulePath}" is deprecated. Instead, add this module to ` +
            `your dependencies and use regular "require" to load it.`
        );
    }

I think we should add shelljs to the dependencies and use regular require in the cordova-paramedic/debug-mode-plugin/scripts/disable-debug-mode.js and cordova-paramedic/debug-mode-plugin/scripts/enable-debug-mode.jsfiles like this:

var shell = require('shelljs');

Environment, Platform, Device

Windows

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Restarting jobs in Travis UI manually leads to multiple identically called test runs on Saucelabs

When a job fails on Saucelabs, we usually restart the job on Travis to trigger it again on Saucelabs. This leads to muliple "test runs" on Saucelabs with the same name.

At the end of the test run, this name is used to get the test run URL etc. As there are now multiple of those, the Travis logs show multiple test runs with no indication, which one was the real one of the current job.

...
Getting saucelabs jobs details...
============================================================================================
Job name: travis-plugin-inappbrowser-516.10
Job ID: 1e797b5b2a294994b3aa469a1117fb50
Job URL: https://saucelabs.com/beta/tests/1e797b5b2a294994b3aa469a1117fb50
Video: https://assets.saucelabs.com/jobs/1e797b5b2a294994b3aa469a1117fb50/video.flv
Appium logs: https://assets.saucelabs.com/jobs/1e797b5b2a294994b3aa469a1117fb50/selenium-server.log
Logcat logs: https://saucelabs.com/jobs/1e797b5b2a294994b3aa469a1117fb50/logcat.log
============================================================================================
============================================================================================
Job name: travis-plugin-inappbrowser-516.10
Job ID: 6dfa634b53f649fea9e501b4e5d00a5c
Job URL: https://saucelabs.com/beta/tests/6dfa634b53f649fea9e501b4e5d00a5c
Video: https://assets.saucelabs.com/jobs/6dfa634b53f649fea9e501b4e5d00a5c/video.flv
Appium logs: https://assets.saucelabs.com/jobs/6dfa634b53f649fea9e501b4e5d00a5c/selenium-server.log
Logcat logs: https://saucelabs.com/jobs/6dfa634b53f649fea9e501b4e5d00a5c/logcat.log
============================================================================================
============================================================================================
Job name: travis-plugin-inappbrowser-516.10
Job ID: ec1795ca19454e64acb0def5ffa8300e
Job URL: https://saucelabs.com/beta/tests/ec1795ca19454e64acb0def5ffa8300e
Video: https://assets.saucelabs.com/jobs/ec1795ca19454e64acb0def5ffa8300e/video.flv
Appium logs: https://assets.saucelabs.com/jobs/ec1795ca19454e64acb0def5ffa8300e/selenium-server.log
Logcat logs: https://saucelabs.com/jobs/ec1795ca19454e64acb0def5ffa8300e/logcat.log
============================================================================================
============================================================================================
Job name: travis-plugin-inappbrowser-516.10
Job ID: 0be6c52b3d2347659fca3afb0a6818ba
Job URL: https://saucelabs.com/beta/tests/0be6c52b3d2347659fca3afb0a6818ba
Video: https://assets.saucelabs.com/jobs/0be6c52b3d2347659fca3afb0a6818ba/video.flv
Appium logs: https://assets.saucelabs.com/jobs/0be6c52b3d2347659fca3afb0a6818ba/selenium-server.log
Logcat logs: https://saucelabs.com/jobs/0be6c52b3d2347659fca3afb0a6818ba/logcat.log
============================================================================================
============================================================================================
Job name: travis-plugin-inappbrowser-516.10
Job ID: 41e39fc78f6045b3afc91ad9836b4e5e
Job URL: https://saucelabs.com/beta/tests/41e39fc78f6045b3afc91ad9836b4e5e
Video: https://assets.saucelabs.com/jobs/41e39fc78f6045b3afc91ad9836b4e5e/video.flv
Appium logs: https://assets.saucelabs.com/jobs/41e39fc78f6045b3afc91ad9836b4e5e/selenium-server.log
Logcat logs: https://saucelabs.com/jobs/41e39fc78f6045b3afc91ad9836b4e5e/logcat.log
============================================================================================
...

Solutions:
a) Change the name to something unique
b) Only report the most recent test run in the output

[Appium] Running camera Appium tests locally fails because it is running the "normal tests" app

... that was built before which doesn't have a plugin, that is required for the tests to pass.


The second app build for Appium adds a plugin cordova-save-image-gallery to the app that seems to be used in the Appium tests:

runCommand(self.options.cli + ' plugin add cordova-save-image-gallery' + util.PARAMEDIC_COMMON_CLI_ARGS, fullAppPath);

When using Saucelabs, this build is uploaded and then used to run the app.
When running locally, the build is not installed on the device, so the previous build that is missing the plugin is used.


Workaround:
Make paramedic.js install the plugin on the first build as well:

additionalPlugins.push('cordova-save-image-gallery');

around line 180 in ParamedicRunner.prototype.installPlugins

using --justbuild throws TypeError: Cannot read property 'displaySauceDetails'

Bug Report

Problem

Got a null error when trying to run a build only execution

cordova-paramedic --platform android --plugin cordova-plugin-inappbrowser --justbuild

What is expected to happen?

Builds without errors

What does actually happen?

It throws a TypeError

Skipping Appium tests: action = build ...
Completed tests at 4:06:35 PM
local-server: killing local file transfer server if it's up...
TypeError: Cannot read property 'displaySauceDetails' of null
    at /Users/ilopez/.nvm/versions/node/v10.15.3/lib/node_modules/cordova-paramedic/lib/paramedic.js:119:40
    at process._tickCallback (internal/process/next_tick.js:61:11)
From previous event:
    at ParamedicRunner.run (/Users/ilopez/.nvm/versions/node/v10.15.3/lib/node_modules/cordova-paramedic/lib/paramedic.js:103:6)
    at Object.exports.run (/Users/ilopez/.nvm/versions/node/v10.15.3/lib/node_modules/cordova-paramedic/lib/paramedic.js:489:19)
    at Object.<anonymous> (/Users/ilopez/.nvm/versions/node/v10.15.3/lib/node_modules/cordova-paramedic/main.js:189:15)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)

Command or Code

cordova-paramedic --platform android --plugin cordova-plugin-inappbrowser --justbuild

Environment, Platform, Device

any

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

"Resort" (and further extract) paramedic.js

Even after extracting some logic in #86 the current paramedic.js is pretty confusing. It would make sense to go through the code and resort the functions according their use in run.

There are also probably further functions that don't really belong in there and can and should be moved somewhere else (e.g. server stuff).

`npm run test-windows` doesn't succeed locally

When I run npm run test-windows the project is created, built and started successfully - but after a super short existence the app is closed again and the process hangs on this:

...
Deploying windows10 package to device:                                                                                                                                                    
C:\Users\Jan\AppData\Local\Temp\tmp-13588d52qYaYI9oDu\platforms\windows\AppPackages\CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test\CordovaApp.Windows10_1.0.0.0_anycpu_debug.appx         
Attempting to uninstall previous application version...                                                                                                                                   
Attempting to install application...                                                                                                                                                      
Found package: C:\Users\Jan\AppData\Local\Temp\tmp-13588d52qYaYI9oDu\platforms\windows\AppPackages\CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test\CordovaApp.Windows10_1.0.0.0_anycpu_debu
g.appx                                                                                                                                                                                    
                                                                                                                                                                                          
Installing app...                                                                                                                                                                         
                                                                                                                                                                                          
Success: Your app was successfully installed.                                                                                                                                             
Starting application...                                                                                                                                                                   
ActivateApplication:  io.cordova.hellocordova_h35559jr9hy9m!io.cordova.hellocordova                                                                                                       
Setting debug mode for application: io.cordova.hellocordova                                                                                                                               
-2147467262                                                                                                                                                                               
cordova-paramedic: waiting for test results                                                                                                                                               

then after a long wait fails with:

Completed tests at 9:48:32 PM
Collecting logs for the devices.
Running Command: C:\Users\Jan\AppData\Local\Temp\tmp-13588d52qYaYI9oDu\platforms\windows\cordova\log.bat --dump --mins 17
Uninstalling the app.
local-server: killing local file transfer server if it's up...
Error: waitForConnection: Seems like device not connected to local server in 300 secs
    at null._onTimeout (C:\Projects\Cordova\cordova-paramedic\lib\paramedic.js:547:24)
    at Timer.listOnTimeout (timers.js:92:15)

npm verb unsafe-perm in lifecycle true
npm info [email protected] Failed to exec test-windows script
npm verb stack Error: [email protected] test-windows: `node main.js --platform windows --plugin ./spec/testable-plugin/ --verbose`
npm verb stack Exit status 1
npm verb stack     at EventEmitter.<anonymous> (C:\nvm\v4.2.0\node_modules\npm\lib\utils\lifecycle.js:214:16)
npm verb stack     at emitTwo (events.js:87:13)
npm verb stack     at EventEmitter.emit (events.js:172:7)
npm verb stack     at ChildProcess.<anonymous> (C:\nvm\v4.2.0\node_modules\npm\lib\utils\spawn.js:24:14)
npm verb stack     at emitTwo (events.js:87:13)
npm verb stack     at ChildProcess.emit (events.js:172:7)
npm verb stack     at maybeClose (internal/child_process.js:818:16)
npm verb stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
npm verb pkgid [email protected]
npm verb cwd C:\Projects\Cordova\cordova-paramedic
npm ERR! Windows_NT 10.0.17134
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "test-windows" "--verbose"
npm ERR! node v4.2.0
npm ERR! npm  v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! [email protected] test-windows: `node main.js --platform windows --plugin ./spec/testable-plugin/ --verbose`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test-windows script 'node main.js --platform windows --plugin ./spec/testable-plugin/ --verbose'.
npm ERR! This is most likely a problem with the cordova-paramedic package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node main.js --platform windows --plugin ./spec/testable-plugin/ --verbose
npm ERR! You can get their info via:
npm ERR!     npm owner ls cordova-paramedic
npm ERR! There is likely additional logging output above.
npm verb exit [ 1, true ]

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Projects\Cordova\cordova-paramedic\npm-debug.log

C:\Projects\Cordova\cordova-paramedic (janpio-replace_wp8_with_browser -> origin) ([email protected])

Restarting the app "HelloCordova" also closes the app without further interaction or feedback.

Remove default SauceLabs parameters

Currently lib\ParamedicConfig.js has something like this:

var DEFAULT_SAUCE_DEVICE_NAME_ANDROID      = 'Android GoogleAPI Emulator';
var DEFAULT_SAUCE_PLATFORM_VERSION_ANDROID = '8.0';
var DEFAULT_SAUCE_DEVICE_NAME_IOS          = 'iPhone Simulator';
var DEFAULT_SAUCE_PLATFORM_VERSION_IOS     = '12.0';
var DEFAULT_SAUCE_APPIUM_VERSION           = '1.9.1';

Those are used as fallbacks if there are no values present in the configuration that should be used.

While this is great in theory, in practice it makes the configurations themselves non deterministic - meaning that although nothing in the configuration itself was changed, a change to the default can mess stuff up. This leads to configurations that depend on these values, and when you change them, stuff breaks.

Would is possibly make sense to remove those fallbacks and force us (and other users) to be more explicit in the SauceLabs configuration?

Support macOS (`cordova-osx`)

Currently Paramedic doesn't support cordova-osx at all. This means all the osx implementations in plugins are not tested at all. This should be changed.

Build fails with modern Xcode build system

My paramedic run fails because it uses the "modern build system" Like apache/cordova-ios#407 suggested I would like to pass the --buildFlag='-UseModernBuildSystem=0' flag to run the build.

Am I missing a paramedic CLI parameter or is this not possible? Should we introduce a way to pass the parameter or use build.json file?

Build settings from configuration file '/private/var/folders/9k/8k2t2pv92q363byqcvfw_1340000h8/T/tmp-10046izGkKwIVm54n/platforms/ios/cordova/build-debug.xcconfig':
    CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
    CODE_SIGN_ENTITLEMENTS = $(PROJECT_DIR)/$(PROJECT_NAME)/Entitlements-$(CONFIGURATION).plist
    CODE_SIGN_IDENTITY = iPhone Developer
    ENABLE_BITCODE = NO
    GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1
    HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include" "$(OBJROOT)/UninstalledProducts/include" "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" "$(BUILT_PRODUCTS_DIR)"
    OTHER_LDFLAGS = -ObjC
    SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h

/private/var/folders/9k/8k2t2pv92q363byqcvfw_1340000h8/T/tmp-10046izGkKwIVm54n/platforms/ios/build/emulator/HelloCordova.app/Info.plist file not found.

Improve error output: "(node:12608) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead."

When I use current master locally (via npm link) I get this output:

λ cordova-paramedic --platform android --plugin ./ --target 02e7f7e9215da7f8
cordova-paramedic: Will use the following cli: cordova
(node:12608) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

Can we improve this error output somehow so it is clearer where this is used? It doesn'T seem to be in paramedic itself, but I have no idea how to dig deeper.

Test runs hang indefinitely on requiring user input

npm run test-windows hangs on Press Enter to continue:

$ npm run test-windows

> [email protected] test-windows P:\cordova\cordova-paramedic
> node main.js --platform windows --plugin ./spec/testable-plugin/

cordova-paramedic: Will use the following cli: cordova
(node:9092) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
cordova-paramedic: creating temp project at C:\Users\Oliver\AppData\Local\Temp\tmp-9092EdFUCB9UMVaM
C:\Users\Oliver\AppData\Local\Temp\tmp-9092EdFUCB9UMVaM P:\cordova\cordova-paramedic
cordova-paramedic: installing plugins
cordova-paramedic: installing P:\cordova\cordova-paramedic\spec\testable-plugin --no-telemetry --no-update-notifier
cordova-paramedic: installing C:\Users\Oliver\AppData\Local\Temp\tmp-9092EdFUCB9UMVaM\plugins\org.apache.cordova.testable-plugin\tests --no-telemetry --no-update-notifier
cordova-paramedic: installing cordova-plugin-test-framework --no-telemetry --no-update-notifier
cordova-paramedic: installing P:\cordova\cordova-paramedic\paramedic-plugin --no-telemetry --no-update-notifier
cordova-paramedic: installing P:\cordova\cordova-paramedic\debug-mode-plugin --no-telemetry --no-update-notifier
cordova-paramedic: setting app start page to test page
cordova-paramedic: adding platform windows( --no-telemetry --no-update-notifier)
cordova-paramedic: successfully finished adding platform windows
cordova-paramedic: checking requirements for platform windows
cordova-paramedic: successfully finished checking requirements for platform windows
local-server: scanning ports from 7008 to 7208
local-server: port 7158 is available
local-server: starting local medic server
cordova-paramedic: writing medic log url to project http://127.0.0.1:7158
Start running tests at 13:59:25
cordova-paramedic: running command cordova run windows --no-telemetry --no-update-notifier
Press Enter to continue...:

Seems like it spawned a PowerShell instance that hangs or that does not get keyboard input passed to it.
When I kill the PowerShell instance, execution continues but ultimately fails because it requires elevated permissions to install a certificate into my certificate store.

Before installing this app, you need to do the following:
        - Install the signing certificate
Administrator credentials are required to continue.  Please accept the UAC prompt and provide your administrator password if asked.
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe: Command failed with exit code 1

When I manually enter the direction and call cordova run windows, I can see that the message about the certificate actually appears before the request for input. The output just isn't flushed yet (it is when I kill the PowerShell process).

Regardless of the missing output though, pressing Enter does not continue execution. When running cordova run standalone, pressing Enter will result in a new, elevated PowerShell instance.

I tested this in Git Bash on Windows 10.

AppVeyor/Windows CI fails: Can not run this platform with administrative permissions. Must be run from a non-admin prompt.

Example:
https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-paramedic/build/1.0.217

...
cordova-paramedic: running command cordova run windows --no-telemetry --no-update-notifier
Completed tests at 19:36:13
Collecting logs for the devices.
Running Command: C:\Users\appveyor\AppData\Local\Temp\1\tmp-21488qPEgmKPhivB\platforms\windows\cordova\log.bat --dump --mins 17
Uninstalling the app.
local-server: killing local file transfer server if it's up...
Building project: C:\Users\appveyor\AppData\Local\Temp\1\tmp-21488qPEgmKPhivB\platforms\windows\CordovaApp.Windows10.jsproj
	Configuration : debug
	Platform      : anycpu
	Buildflags    : /p:AppxBundle=Never
	MSBuildTools  : C:\Program Files (x86)\MSBuild\14.0\bin\
buildProject spawn: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild [ 'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\tmp-21488qPEgmKPhivB\\platforms\\windows\\CordovaApp.Windows10.jsproj',
  '/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal',
  '/nologo',
  '/p:Configuration=debug',
  '/p:Platform=anycpu',
  '/p:AppxBundle=Never' ] { stdio: 'inherit' }
  prebuild.js: Patching platform `10`
  - Injected `base.js` reference to `/www/cdvtests/index.html`
  - Removing /( *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.WinJS.2.0\/js\/base.js">\s*<\/script>)(\s*)/ from /www/cdvtests/index.html
  - Removing /( *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.Phone.WinJS.2.1\/js\/base.js">\s*<\/script>)(\s*)/ from /www/cdvtests/index.html
  CordovaApp.Windows10 -> C:\Users\appveyor\AppData\Local\Temp\1\tmp-21488qPEgmKPhivB\platforms\windows\AppPackages\CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test\CordovaApp.Windows10_1.0.0.0_anycpu_debug.appx
Can not run this platform with administrative permissions. Must be run from a non-admin prompt.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test-windows: `node main.js --platform windows --plugin ./spec/testable-plugin/`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] test-windows script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
...

[iOS] --args flag is not being passed correctly when using SauceLabs

Bug Report

CONFIGURATION_BUILD_DIR = /private/var/folders/yy/d215g62s727f4w2137t9jl2m0000gn/T/tmp-6917i2tF6EmpyV5/platforms/ios/build, build folder is not being generated while using SauceLabs for iOS.

Problem

While using SauceLabs the arguments passed within the --args flag are not being passed correctly.

What is expected to happen?

The build folder should be created in order to be able to send the .app/.ipa to SauceLabs.

What does actually happen?

I get an error because the pad specified above is not being found.

Information

Command or Code

 npx cordova-paramedic --platform ios --plugin ./ --shouldUseSauce --sauceUser ****** --sauceKey ********** --buildName "cordova-paramedic-ios"  --outputDir /tmp/junit --verbose --args=--buildFlag='-UseModernBuildSystem=0'

Environment, Platform, Device

  • MacOS Mojave 10.14.4

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Extract Sauce Labs Code

Currenty paramedic.js is >1000 lines of code that contains all the main functionality. It is very hard to follow and get an overview, as it contains both the code for local testing and the remote testing on Sauce Labs.

It would be great to extract at least the Sauce Labs part somehow, so it becomes easier to understand what is going on.

I already worked through the whole file to understand what is going on, so I should be able to identify the "Sauce Labs only" parts and move them into their own file.

Appium tests don't work with `--plugin ./`

You can use this command cordova-paramedic --platform android --plugin ./ --target 02e7f7e9215da7f8 --useTunnel to run paramedic inside a Cordova plugin directory.

Normal tests do work that way, but for the Appium ones you get this error message:

Couldn't find Appium tests, skipping...

The reason is that the searchpaths that are generated are wrong:

paramedic-appium: searchpaths: C:\Users\Jan\AppData\Local\Temp\tmp-12736Po0pqTp96m0u\plugins\appium-tests\android,C:\Users\Jan\AppData\Local\Temp\tmp-12736Po0pqTp96m0u\plugins\appium-tests\common

The paths are missing the plugin folder and point to invalid directories.

Tests are failing on CI

Only red X back to 2016 - seems these tests never worked.

(Bit ironic for an app that runs tests...)

Further improve CI testing

In #81 I changed the CI configuration so it now runs testing for iOS and browser locally and iOS, Android and Browser platforms on SauceLabs.

This should further be improved by...

  1. splitting each of the local runs into its own "job" so it is easier to figure out what is broken and faster because of parallelization.
  2. adding local Android run with emulator: https://docs.travis-ci.com/user/languages/android/
  3. adding Appium tests into the mix

Allow configuration of OS version for browsers

Currently the base OS is hardcoded for Windows 10 and macOS 10.12:

caps.platform = caps.browserName.indexOf('Edge') > 0 ? 'Windows 10' : 'macOS 10.12';

This should be configurable, equivalent to how it can be configured with Saucelabs:

DesiredCapabilities caps = DesiredCapabilities.safari();
caps.setCapability("platform", "macOS 10.12");
caps.setCapability("version", "11.0");

https://wiki.saucelabs.com/display/DOCS/2017/10/20/Announcing%2Bsupport%2Bfor%2BSafari%2B11%2Bin%2BMac%2BOS%2B10.12

What does `--tccdb` do exactly and how to use it?

This is about https://github.com/apache/cordova-paramedic#--tccdb-optional

--tccDb (optional)
iOS only parameter. The path to the sample TCC DB file, with permissions, to be copied to the simulator.
cordova-paramedic --platform ios --plugin cordova-plugin-contacts --tccDbPath tcc.db

Was added to the codebase with this commit: 739c432

But doesn't seem to be used anywhere in our repositories:
https://github.com/search?q=org%3Aapache+tccDb&type=Code


sujan [5:15 PM]
What is a "TCC DB file"?
it has to do with iOS, permissions, maybe contacts
Was added to paramedic here: 739c432
"Apple’s TCC privacy database"

dpogue [5:16 PM]
Seems to be a database of apps and their permissions

sujan [5:17 PM]

The path to the sample TCC DB file, with permissions, to be copied to the simulator.

Tests fail on iOS when WKWebView plugin is present

Currently, if you add cordova-plugin-wkwebview-engine as a plugin dependency to the tests/plugin.xml of a plugin then run the tests against the iOS platform using cordova-paramedic, they will fail because the local server times out waiting for a connection, despite the tests actually passing in the Simulator.

As highlighted in my comment, this is causing the Travis CI tests to fail for my PR to add WKWebView support to cordova-plugin-inappbrowser.

With UIWebView being deprecated in iOS 12 and the intention to add implicit WKWebView support to cordova-ios@5, there is a need to resolve this issue other than to unblock my PR.

Travis CI console output

cordova-paramedic: connecting webdriver
.........................................................................................
cordova-paramedic: connecting to app
cordova-paramedic: waiting for test results
cordova-paramedic: Tests failed to complete; ending appium session. The error is:
Error: waitForTests: Seems like device not connected to local server in 540 secs
    at null._onTimeout (/private/tmp/paramedic/lib/paramedic.js:467:24)
    at Timer.listOnTimeout (timers.js:92:15)
Running Appium tests on Sauce Labs
Couldn't find Appium tests, skipping...
Completed tests at 3:26:19 PM
Getting saucelabs jobs details...
============================================================================================
Job name: travis-plugin-inappbrowser-528.5
Job ID: 9e9fe12e7103401daeb12a776de27920
Job URL: https://saucelabs.com/beta/tests/9e9fe12e7103401daeb12a776de27920
Video: https://assets.saucelabs.com/jobs/9e9fe12e7103401daeb12a776de27920/video.flv
Appium logs: https://assets.saucelabs.com/jobs/9e9fe12e7103401daeb12a776de27920/selenium-server.log
============================================================================================
============================================================================================
Job name: travis-plugin-inappbrowser-528.5
Job ID: c55b39dde835418284afaa722caac636
Job URL: https://saucelabs.com/beta/tests/c55b39dde835418284afaa722caac636
Video: https://assets.saucelabs.com/jobs/c55b39dde835418284afaa722caac636/video.flv
Appium logs: https://assets.saucelabs.com/jobs/c55b39dde835418284afaa722caac636/selenium-server.log
============================================================================================
local-server: killing local file transfer server if it's up...
cordova-paramedic: Deleting the application: /var/folders/bb/n7t3rs157850byt_jfdcq9k80000gn/T/tmp-2328OlO9Er6tnA8D
/Users/travis/build/apache/cordova-plugin-inappbrowser
Finished with exit code 1
The command "node /tmp/paramedic/main.js --config pr/$PLATFORM --plugin $(pwd) --shouldUseSauce --buildName travis-plugin-inappbrowser-$TRAVIS_JOB_NUMBER" exited with 1.
Done. Your build exited with 1.

Extract code to run local tests from paramedic.js

All the methods that are only used when running tests locally could be extracted from paramedic.js to further simplify the logic:

setPermissions
maybeRunFileTransferServer
runLocalTests
waitForConnection
collectDeviceLogs
uninstallApp

Remove browserify

As apart of Cordova 9 release work, browserify is being removed from all various repos. apache/cordova#8

Since paramedic is a tooling, the removal of browserify is not necessary for the Cordova 9 release process but should be removed.

This ticket is to keep track of this request.

Failing runs still report success

Reported by @dopry at from https://issues.apache.org/jira/browse/CB-14052:

I'm using cordova-paramedic with --justbuild. The build of the app is failing, but cordova paramedic is reporting success. You can check out one of my ci builds to see it.

In this case the requirements check is failing. I would expect this to return a non-zero and fail the build.

#!/bin/bash -eo pipefail npx cordova-paramedic --cleanUpAfterRun --verbose --platform [email protected] --plugin "." --justbuild
cordova-paramedic: Will use the following cli: cordova(node:1495) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.cordova-paramedic: creating temp project at /tmp/tmp-1495jQi7eTMc8Hh6Creating a new cordova project.
/tmp/tmp-1495jQi7eTMc8Hh6 /home/circleci/projectcordova-paramedic: installing pluginscordova-paramedic: installing /home/circleci/project --no-telemetry --no-update-notifier
Adding com.unarin.cordova.beacon to package.json
Saved plugin info for "com.unarin.cordova.beacon" to config.xml
com.unarin.cordova.beacon 3.6.1 "Proximity Beacon Plugin"
cordova-paramedic: installing cordova-plugin-test-framework --no-telemetry --no-update-notifier
Adding cordova-plugin-test-framework to package.json
Saved plugin info for "cordova-plugin-test-framework" to config.xml
cordova-paramedic: installing /home/circleci/project/node_modules/cordova-paramedic/paramedic-plugin --no-telemetry --no-update-notifier
Adding cordova-plugin-paramedic to package.json
Saved plugin info for "cordova-plugin-paramedic" to config.xml
cordova-paramedic: setting app start page to test pagecordova-paramedic: adding platform [email protected]( --no-telemetry --no-update-notifier)Using cordova-fetch for [email protected]
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: io.cordova.hellocordova
Name: HelloCordova
Activity: MainActivity
Android target: android-26
Subproject Path: CordovaLib
Android project created with [email protected]
Installing "com.unarin.cordova.beacon" for android
Installing "cordova-plugin-device" for android
Installing "cordova-plugin-paramedic" for android
Installing "cordova-plugin-test-framework" for android
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Installing "cordova-plugin-whitelist" for androidThis plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do not need this plugin since the whitelist will be built in.Adding cordova-plugin-whitelist to package.json
Saved plugin info for "cordova-plugin-whitelist" to config.xml
--save flag or autosave detected
Saving android@~6.4.0 into config.xml file ...cordova-paramedic: successfully finished adding platform [email protected]: checking requirements for platform androidRequirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
{{Android target: not installed }}
Please install Android target / API level: "android-26".Hint: Open the SDK manager by running: /opt/android/sdk/tools/android
You will require:
1. "SDK Platform" for API level android-26
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)
Gradle: installed /usr/share/gradle/bin/gradle
(node:1822) UnhandledPromiseRejectionWarning: CordovaError: Some of requirements check failed
at /home/circleci/project/node_modules/cordova/src/cli.js:414:27
at _fulfilled (/home/circleci/project/node_modules/cordova-lib/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/home/circleci/project/node_modules/cordova-lib/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/home/circleci/project/node_modules/cordova-lib/node_modules/q/q.js:749:13)
at /home/circleci/project/node_modules/cordova-lib/node_modules/q/q.js:557:44
at flush (/home/circleci/project/node_modules/cordova-lib/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:1822) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1822) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.cordova-paramedic: successfully finished checking requirements for platform androidlocal-server: scanning ports from 7008 to 7208
local-server: port 7028 is availablelocal-server: starting local medic servercordova-paramedic: writing medic log url to project http://10.0.2.2:7028
Start running tests at 04:45:42
cordova-paramedic: running command cordova build android --no-telemetry --no-update-notifier
Skipping Appium tests...
Completed tests at 04:45:43
local-server: killing local file transfer server if it's up...cordova-paramedic: Deleting the application: /tmp/tmp-1495jQi7eTMc8Hh6/home/circleci/projectFinished with exit code 0

look at the cordova-android step in any of these builds

https://circleci.com/gh/dopry/cordova-plugin-ibeacon/129
https://circleci.com/gh/dopry/cordova-plugin-ibeacon/130
https://circleci.com/gh/dopry/cordova-plugin-ibeacon/132
https://circleci.com/gh/dopry/cordova-plugin-ibeacon/133

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.