Coder Social home page Coder Social logo

Comments (5)

mmcc007 avatar mmcc007 commented on August 15, 2024

A device is of the form:

      - name: Apple iPhone11
        model: iPhone11
        os: 13.1.3

not

      - arn: arn:aws:devicefarm:us-west-2::device:58D6FB12B3624256AED26D0F940D4427

For example, to find available android Pixel devices:

sylph -d android | grep Pixel
name:Google Pixel, model:Pixel, os:7.1.2, deviceType:android, formFactor:phone, availability:HIGHLY_AVAILABLE
name:Google Pixel 2, model:Google Pixel 2, os:8.0.0, deviceType:android, formFactor:phone, availability:HIGHLY_AVAILABLE
name:Google Pixel 2, model:Google Pixel 2, os:8.1.0, deviceType:android, formFactor:phone, availability:HIGHLY_AVAILABLE
name:Google Pixel 2, model:Google Pixel 2, os:9.0.0, deviceType:android, formFactor:phone, availability:HIGHLY_AVAILABLE
name:Google Pixel 2 XL, model:Google Pixel 2 XL, os:8.0.0, deviceType:android, formFactor:phone, availability:HIGHLY_AVAILABLE
name:Google Pixel 2 XL, model:Google Pixel 2 XL, os:9.0.0, deviceType:android, formFactor:phone, availability:HIGHLY_AVAILABLE
name:Google Pixel 3, model:Pixel 3, os:9.0.0, deviceType:android, formFactor:phone, availability:BUSY
name:Google Pixel 3, model:Pixel 3, os:10.0.0, deviceType:android, formFactor:phone, availability:AVAILABLE
name:Google Pixel 3 XL, model:Pixel 3 XL, os:9.0.0, deviceType:android, formFactor:phone, availability:HIGHLY_AVAILABLE
name:Google Pixel 3 XL, model:Pixel 3 XL, os:10.0.0, deviceType:android, formFactor:phone, availability:HIGHLY_AVAILABLE
name:Google Pixel 4 (Unlocked), model:{GA01188-US}, os:10.0.0, deviceType:android, formFactor:phone, availability:HIGHLY_AVAILABLE
name:Google Pixel 4 XL (Unlocked), model:{GA01182-US}, os:10.0.0, deviceType:android, formFactor:phone, availability:HIGHLY_AVAILABLE
name:Google Pixel XL, model:Pixel XL, os:8.0.0, deviceType:android, formFactor:phone, availability:HIGHLY_AVAILABLE

Select the Pixel devices you want to run tests on by name, model, and os and add to an android pool.

from sylph.

AnzhelaAninian avatar AnzhelaAninian commented on August 15, 2024

@mmcc007 I have tried this form as well :

name: Google Pixel 2
    model: Google Pixel 2
    platform: ANDROID
    os: 9

Have got the same exception.

This command doesn't work for me as well : sylph -d android | grep Pixel

sylph -d android | grep Pixel
Unhandled exception:
FormatException: Missing expected digit (at character 2)
---------------------------------------------------------------------------...
 ^

#0      _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1394:5)
#1      _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1258:9)
#2      _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:926:22)
#3      _parseJson (dart:convert-patch/convert_patch.dart:31:10)
#4      JsonDecoder.convert (dart:convert/json.dart:495:36)
#5      JsonCodec.decode (dart:convert/json.dart:153:41)
#6      jsonDecode (dart:convert/json.dart:96:10)
#7      deviceFarmCmd (package:sylph/src/base/utils.dart:150:10)
#8      getDeviceFarmDevices (package:sylph/src/device_farm.dart:290:30)
#9      getDeviceFarmDevicesByType (package:sylph/src/device_farm.dart:283:10)
#10     run (file:///Users/angela/flutter/.pub-cache/hosted/pub.dartlang.org/sylph-0.7.2/bin/main.dart:76:32)
#11     main.<anonymous closure> (file:///Users/angela/flutter/.pub-cache/hosted/pub.dartlang.org/sylph-0.7.2/bin/main.dart:62:13)
#12     AppContext.run.<anonymous closure> (package:tool_base/src/base/context.dart:154:29)
#13     _rootRun (dart:async/zone.dart:1126:13)
#14     _CustomZone.run (dart:async/zone.dart:1023:19)
#15     _runZoned (dart:async/zone.dart:1518:10)
#16     runZoned (dart:async/zone.dart:1465:12)
#17     AppContext.run (package:tool_base/src/base/context.dart:153:18)
#18     runInContext (package:sylph/src/context_runner.dart:11:24)
#19     main (file:///Users/angela/flutter/.pub-cache/hosted/pub.dartlang.org/sylph-0.7.2/bin/main.dart:61:11)
#20     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
#21     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)

from sylph.

mmcc007 avatar mmcc007 commented on August 15, 2024

Confirm that your aws command is configured to return json by default
eg,

cat ~/.aws/config
[default]
output = json
region = us-west-2

(https://github.com/mmcc007/sylph#aws-cli-credentials)

A command such as aws devicefarm list-devices should return valid json.

from sylph.

AnzhelaAninian avatar AnzhelaAninian commented on August 15, 2024

@mmcc007 thanks you for your help, it was configured to return table. Have change it to json, but now i'm running into another issue. Maybe you can give me some advice?

The exception I'm running into is the following:

Starting Sylph run 'sylph run 2020-03-18 20:34:05.781' on AWS Device Farm ... Config file: sylph.yaml Unpacking sylph resources to ./tmp/sylph Creating test bundle for upload... Unhandled exception: Invalid argument(s): Cannot copy from . to ./tmp/sylph/test_bundle/flutter_app #0 _doNothing (package:sylph/src/base/copy_path.dart:15:5) #1 copyPathSync (package:sylph/src/base/copy_path.dart:56:7) #2 LocalPackageManager.copy (package:sylph/src/base/local_packages.dart:104:7) #3 bundleFlutterTests (package:sylph/src/bundle.dart:31:23) #4 sylphRun (package:sylph/src/sylph_run.dart:59:3) <asynchronous suspension> #5 run (file:///Users/angela/flutter/.pub-cache/hosted/pub.dartlang.org/sylph-0.7.2/bin/main.dart:97:35) <asynchronous suspension> #6 main.<anonymous closure> (file:///Users/angela/flutter/.pub-cache/hosted/pub.dartlang.org/sylph-0.7.2/bin/main.dart:62:13) #7 AppContext.run.<anonymous closure> (package:tool_base/src/base/context.dart:154:29) #8 _rootRun (dart:async/zone.dart:1126:13) #9 _CustomZone.run (dart:async/zone.dart:1023:19) #10 _runZoned (dart:async/zone.dart:1518:10) #11 runZoned (dart:async/zone.dart:1465:12) #12 AppContext.run (package:tool_base/src/base/context.dart:153:18) #13 runInContext (package:sylph/src/context_runner.dart:11:24) #14 main (file:///Users/angela/flutter/.pub-cache/hosted/pub.dartlang.org/sylph-0.7.2/bin/main.dart:61:11) #15 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32) #16 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)

from sylph.

mmcc007 avatar mmcc007 commented on August 15, 2024

@AnzhelaAninian Looks like the code to handle local packages (needed when local packages are present) expects the path to tmp directory to be absolute:

tmp_dir: ./tmp/sylph

should be

tmp_dir: /tmp/sylph

(I've opened an issue to remove tmp_dir from config file... and another one to remove dependency on aws to be configged for json. Thanks for your feedback!)

from sylph.

Related Issues (20)

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.