apache / cordova-paramedic

Apache Cordova - Paramedic
https://cordova.apache.org/
Apache License 2.0
36 stars 53 forks source link

CI: Broken for Appium tests on local build #142

Open janpio opened 5 years ago

janpio commented 5 years ago

Broken:

Start running Appium tests...
Running Appium tests locally
paramedic-appium: Found tests in: /var/folders/17/5mc7816d3mndxjqgplq6057w0000gn/T/tmp-2850ZFGeneUrqDA0/plugins/cordova-plugin-camera/appium-tests/ios
paramedic-appium: Setting "CameraUsesGeolocation" preference to "true"
paramedic-appium: Adding CSP source "http://*" to directive "connect-src"
paramedic-appium: Adding a whitelist "access" rule for origin: *
paramedic-appium: It is already in place
/private/var/folders/17/5mc7816d3mndxjqgplq6057w0000gn/T/tmp-2850ZFGeneUrqDA0 /private/var/folders/17/5mc7816d3mndxjqgplq6057w0000gn/T/tmp-2850ZFGeneUrqDA0 /Users/travis/build/apache/cordova-plugin-camera
$ cordova plugin add cordova-save-image-gallery --no-telemetry --no-update-notifier
Installing "cordova-save-image-gallery" for ios
Adding cordova-save-image-gallery to package.json
/private/var/folders/17/5mc7816d3mndxjqgplq6057w0000gn/T/tmp-2850ZFGeneUrqDA0 /Users/travis/build/apache/cordova-plugin-camera
paramedic-appium: Building the app...
$ cordova build ios --no-telemetry --no-update-notifier
local-server: new socket connection
ls: no such file or directory: /var/folders/17/5mc7816d3mndxjqgplq6057w0000gn/T/tmp-2850ZFGeneUrqDA0/platforms/ios/build/emulator*.app
paramedic-appium: Looking for the app package in: /var/folders/17/5mc7816d3mndxjqgplq6057w0000gn/T/tmp-2850ZFGeneUrqDA0/platforms/ios/build/emulator
/Users/travis/.nvm/versions/node/v6.17.1/lib/node_modules/cordova-paramedic/lib/appium/AppiumRunner.js:370
        throw new Error('Could not find the app package');
        ^
Error: Could not find the app package
    at getPackagePath (/Users/travis/.nvm/versions/node/v6.17.1/lib/node_modules/cordova-paramedic/lib/appium/AppiumRunner.js:370:15)
    at child_process.exec (/Users/travis/.nvm/versions/node/v6.17.1/lib/node_modules/cordova-paramedic/lib/appium/AppiumRunner.js:291:43)
    at ChildProcess.exithandler (child_process.js:190:7)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:920:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
The command "$PARAMEDIC_COMMAND --config ./pr/$PLATFORM --plugin $PARAMEDIC_PLUGIN_TO_TEST --buildName $PARAMEDIC_BUILDNAME" exited with 1.

Example: https://travis-ci.org/apache/cordova-plugin-camera/jobs/530514190


Problem is that Paramedic itself doesn't have any tests of this kind, so it is difficult to test here in this repo first :/

janpio commented 5 years ago

Paramedic now has a PR that would add an Appium test that would trigger exactly that failure: https://github.com/apache/cordova-paramedic/pull/151