Giter Club home page Giter Club logo

Comments (6)

FisherKK avatar FisherKK commented on September 24, 2024

Hey!
Sorry for late response. I will look at it tomorrow.
For now it might be helpful to tell me how your AVDs look like why script is waiting for parameters.

At first look - you could give a try without "-no-boot-anim" param. I think the problem is that I am waiting for parameters to load but they will never load as no animation is starting.

I will check it and fix it.

from fastlane-plugin-automated-test-emulator-run.

deepanshumadan avatar deepanshumadan commented on September 24, 2024

Thanks @FisherKK . AVDs looks fine, they are all ready to go and set up.

I also tried removing "-no-boot-anim", it still gets stuck at the same place.

from fastlane-plugin-automated-test-emulator-run.

FisherKK avatar FisherKK commented on September 24, 2024

Hey @deepanshumadan,

I apologise for the fact I had promised to look at it the day before yesterday and I could not find time. I have checked it now though and for first look it simply worked for me so I am a bit confused. For now let's make sure we are having similar SDK specs because there might be some kind of difference and we are unaware of it.

  1. AVD config you have sent me looks like that:
{
    "avd_list": [
        {
          "avd_name": "Test-Emulator-API21_1",

          "create_avd_package": "system-images;android-21;google_apis;x86_64",
          "create_avd_device": "Nexus 5X",
          "create_avd_tag": "google_apis",
          "create_avd_abi": "x86_64",
          "create_avd_additional_options": "--skin \"1080x1920\" --sdcard 2048M",
          "create_avd_hardware_config_filepath": "",

          "launch_avd_port": "",
          "launch_avd_snapshot_filepath": "",
          "launch_avd_launch_binary_name": "emulator",
          "launch_avd_additional_options": "-gpu on -no-boot-anim -partition-size 2048 -wipe-data -skin \"1080x1920\""
        }
    ]
}

The difference is that I had to add \ before quoting marks which surrounds screen size as my fastlane would not run with them. JSON formatting falls apart.

  1. I didn't have any SDK for Android 21 so I have downloaded everything via Android Studio. You can try to bring versions of your tools to the similar state, maybe it will help:

a) SDK Manager API:
Screen_Shot_2017_04_21_at_00_25_07
how do you upload pictures

b) SDK Tools Tools:
Screen_Shot_2017_04_21_at_00_25_28
c) AVD Manager - image of AVD:
Screen_Shot_2017_04_21_at_00_28_59

  1. Part of my terminal where it just had worked:
[00:20:09]: Preparing commands for Android ADB
[00:20:09]: Preparing parameters and commands for emulator: Test-Emulator-API21_1
[00:20:09]: Successfully created tmp output file for AVD: Test-Emulator-API21_1. File: /var/folders/12/c6c0nn3d20788xz63zx53td00000gn/T/emulator_output20170421-36035-12t0u8a
[00:20:09]: Configuring environment in order to launch emulators: 
[00:20:09]: Getting avaliable AVDs
[00:20:09]: $ /Users/F1sherKK/Library/Android/sdk/tools/bin/avdmanager list avd
[00:20:11]: ▸ Available Android Virtual Devices:
[00:20:11]: ▸ Name: Test-Emulator-API23-Nexus-5-0
[00:20:11]: ▸ Device: Nexus 5X (Google)
[00:20:11]: ▸ Path: /Users/F1sherKK/.android/avd/Test-Emulator-API23-Nexus-5-0.avd
[00:20:11]: ▸ Target: Google APIs (Google Inc.)
[00:20:11]: ▸ Based on: Android 6.0 (Marshmallow) Tag/ABI: google_apis/x86_64
[00:20:11]: ▸ Skin: nexus_5x
[00:20:11]: ▸ Sdcard: 100M
[00:20:11]: ▸ ---------
[00:20:11]: ▸ Name: Test-Emulator-API23-Nexus-5-1
[00:20:11]: ▸ Device: Nexus 5X (Google)
[00:20:11]: ▸ Path: /Users/F1sherKK/.android/avd/Test-Emulator-API23-Nexus-5-1.avd
[00:20:11]: ▸ Target: Google APIs (Google Inc.)
[00:20:11]: ▸ Based on: Android 6.0 (Marshmallow) Tag/ABI: google_apis/x86_64
[00:20:11]: ▸ Skin: nexus_5x
[00:20:11]: ▸ Sdcard: 100M
[00:20:11]: ▸ ---------
[00:20:11]: ▸ Name: Test-Emulator-API23-Nexus-5-2
[00:20:11]: ▸ Device: Nexus 5X (Google)
[00:20:11]: ▸ Path: /Users/F1sherKK/.android/avd/Test-Emulator-API23-Nexus-5-2.avd
[00:20:11]: ▸ Target: Google APIs (Google Inc.)
[00:20:11]: ▸ Based on: Android 6.0 (Marshmallow) Tag/ABI: google_apis/x86_64
[00:20:11]: ▸ Skin: nexus_5x
[00:20:11]: ▸ Sdcard: 100M
[00:20:11]: AVD with name 'Test-Emulator-API21_1' does not exist. Creating new AVD.
[00:20:11]: $ echo "no" | /Users/F1sherKK/Library/Android/sdk/tools/bin/avdmanager create avd --name "Test-Emulator-API21_1" --package "system-images;android-21;google_apis;x86_64" --device "Nexus 5X" --tag google_apis --abi x86_64 
[00:20:16]: Restarting adb
[00:20:16]: $ /Users/F1sherKK/Library/Android/sdk/platform-tools/adb kill-server
[00:20:16]: $ /Users/F1sherKK/Library/Android/sdk/platform-tools/adb start-server
[00:20:19]: ▸ * daemon not running. starting it now at tcp:5037 *
[00:20:19]: ▸ * daemon started successfully *
[00:20:19]: Attemting to apply custom config to Test-Emulator-API21_1
[00:20:19]: No config file found for AVD 'Test-Emulator-API21_1'. AVD won't have config.ini applied.
[00:20:19]: Launching all AVDs at the same time.
[00:20:19]: Waiting for AVDs to finish booting.
[00:20:19]: Performig wait for ADB boot
[00:20:19]: $ /Users/F1sherKK/Library/Android/sdk/emulator/emulator -port 5556 -avd Test-Emulator-API21_1  -gpu on -no-boot-anim -partition-size 2048 -wipe-data -skin "1080x1920" &>/var/folders/12/c6c0nn3d20788xz63zx53td00000gn/T/emulator_output20170421-36035-12t0u8a&
[00:20:29]: $ /Users/F1sherKK/Library/Android/sdk/platform-tools/adb devices | grep [0-9] | tr -s "	" " | cut -d"
[00:20:29]: ▸ emulator-5556 offline
[00:20:39]: $ /Users/F1sherKK/Library/Android/sdk/platform-tools/adb devices | grep [0-9] | tr -s "	" " | cut -d"
[00:20:39]: ▸ emulator-5556 device
[00:20:39]: Wait for ADB boot completed with success
[00:20:39]: Performing wait for params: dev.bootcomplete, sys.boot_completed, init.svc.bootanim.
[00:20:46]: $ /Users/F1sherKK/Library/Android/sdk/platform-tools/adb devices | grep [0-9] | tr -s "	" " | cut -d"
[00:20:46]: ▸ emulator-5556 device
[00:20:46]: AVDs Booted!
[00:20:46]: Starting tests
[00:20:46]: Using gradle task.
[00:20:46]: $ ANDROID_SERIAL= ./gradlew spoon -PspoonPackage=com.azimo.sendmoney.instrumentation.azimoTestCases.bddTests.functional.AuthFlow -PspoonTestLogDir=bddFunction/AuthFlow
[00:20:47]: ▸ Parallel execution is an incubating feature.
[00:21:40]: ▸ The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

(...)
  1. I have made sure I have committed and sent as *.gem all code. So version 1.4.1 is most recent one.

  2. About your question about downgrading to 1.3.1, it won't work since build tools 25.0.2 as there was new binaries handling AVD launch announced. You stopped using android binary and started using avdmanager instead and thats what 1.4+ is for.

Check the differences for now. I will have to look at code and "imagine what could go wrong there". I hope we will make it somehow though.

from fastlane-plugin-automated-test-emulator-run.

deepanshumadan avatar deepanshumadan commented on September 24, 2024

thanks @FisherKK for looking into it. I didn't send you the entire config, I have 6 devices in the config (same device configurations). I just tested it works fine for 2 devices, for 6 it gets stuck. I also made sure i am giving 12 gb memory to HAXm, but still its getting stuck there for 6 devices. and this started happening just after i updated the plugin to 1.4.1

from fastlane-plugin-automated-test-emulator-run.

FisherKK avatar FisherKK commented on September 24, 2024

I wonder if you aren't increasing RAM allowance per AVD too much. How about you try decreasing those 2048 values and number of AVD and increase little by little to see how it reacts?

from fastlane-plugin-automated-test-emulator-run.

FisherKK avatar FisherKK commented on September 24, 2024

Hey @deepanshumadan I wonder if you managed to fix your problem. If not then I did something that might help you. Plugin ver was updated to 1.5.0.

I have rewritten whole "wait for params" process. Now you will be able to:

  • see which parameters have loaded for every device separately so you can debug an issue
(...)
[16:21:09]: Launching all AVDs at the same time.
[16:21:09]: Waiting for AVDs to finish booting.
[16:21:09]: Performig wait for ADB boot
[16:21:09]: $ /Users/F1sherKK/Library/Android/sdk/emulator/emulator -port 5556 -avd Test-Emulator-API23-Nexus-5-1 -wipe-data -initdata ~/Android/AVD_Snapshots/Nexus_5X_API_23/Nexus_5X_API_23_SNAPSHOT.img -gpu on -show-kernel -verbose &>/var/folders/12/c6c0nn3d20788xz63zx53td00000gn/T/emulator_output20170504-4953-vzhqek&
[16:21:09]: $ /Users/F1sherKK/Library/Android/sdk/emulator/emulator -port 5558 -avd Test-Emulator-API23-Nexus-5-2 -wipe-data -initdata ~/Android/AVD_Snapshots/Nexus_5X_API_23/Nexus_5X_API_23_SNAPSHOT.img -gpu on -show-kernel -verbose &>/var/folders/12/c6c0nn3d20788xz63zx53td00000gn/T/emulator_output20170504-4953-z93mje&
[16:21:19]: $ /Users/F1sherKK/Library/Android/sdk/platform-tools/adb devices | grep [0-9] | tr -s "	" " | cut -d"
[16:21:29]: $ /Users/F1sherKK/Library/Android/sdk/platform-tools/adb devices | grep [0-9] | tr -s "	" " | cut -d"
[16:21:39]: $ /Users/F1sherKK/Library/Android/sdk/platform-tools/adb devices | grep [0-9] | tr -s "	" " | cut -d"
[16:21:39]: ▸ emulator-5556 offline
[16:21:39]: ▸ emulator-5558 offline
[16:21:49]: $ /Users/F1sherKK/Library/Android/sdk/platform-tools/adb devices | grep [0-9] | tr -s "	" " | cut -d"
[16:21:49]: ▸ emulator-5556 device
[16:21:49]: ▸ emulator-5558 device
[16:21:49]: Wait for ADB boot completed with success
[16:21:49]: Performing wait for params: 'dev.bootcomplete', 'sys.boot_completed', 'init.svc.bootanim'.
[16:21:49]: Device 'emulator-5556' launch status:
[16:21:49]: 'dev.bootcomplete' - '' (launched: false)
[16:21:49]: 'sys.boot_completed' - '' (launched: false)
[16:21:49]: 'init.svc.bootanim' - 'running' (launched: false)
[16:21:50]: Device 'emulator-5558' launch status:
[16:21:50]: 'dev.bootcomplete' - '' (launched: false)
[16:21:50]: 'sys.boot_completed' - '' (launched: false)
[16:21:50]: 'init.svc.bootanim' - 'running' (launched: false)
[16:22:00]: Device 'emulator-5556' launch status:
[16:22:00]: 'dev.bootcomplete' - '' (launched: false)
[16:22:00]: 'sys.boot_completed' - '' (launched: false)
[16:22:00]: 'init.svc.bootanim' - 'running' (launched: false)
[16:22:00]: Device 'emulator-5558' launch status:
[16:22:00]: 'dev.bootcomplete' - '' (launched: false)
[16:22:00]: 'sys.boot_completed' - '' (launched: false)
[16:22:00]: 'init.svc.bootanim' - 'running' (launched: false)
[16:22:10]: Device 'emulator-5556' launch status:
[16:22:10]: 'dev.bootcomplete' - '' (launched: false)
[16:22:10]: 'sys.boot_completed' - '' (launched: false)
[16:22:10]: 'init.svc.bootanim' - 'running' (launched: false)
[16:22:10]: Device 'emulator-5558' launch status:
[16:22:10]: 'dev.bootcomplete' - '' (launched: false)
[16:22:10]: 'sys.boot_completed' - '' (launched: false)
[16:22:10]: 'init.svc.bootanim' - 'running' (launched: false)
[16:22:20]: Device 'emulator-5556' launch status:
[16:22:20]: 'dev.bootcomplete' - '' (launched: false)
[16:22:20]: 'sys.boot_completed' - '' (launched: false)
[16:22:20]: 'init.svc.bootanim' - 'running' (launched: false)
[16:22:20]: Device 'emulator-5558' launch status:
[16:22:20]: 'dev.bootcomplete' - '' (launched: false)
[16:22:20]: 'sys.boot_completed' - '' (launched: false)
[16:22:20]: 'init.svc.bootanim' - 'running' (launched: false)
[16:22:30]: Device 'emulator-5556' launch status:
[16:22:30]: 'dev.bootcomplete' - '1' (launched: true)
[16:22:30]: 'sys.boot_completed' - '1' (launched: true)
[16:22:30]: 'init.svc.bootanim' - 'stopped' (launched: true)
[16:22:31]: Device 'emulator-5558' launch status:
[16:22:31]: 'dev.bootcomplete' - '1' (launched: true)
[16:22:31]: 'sys.boot_completed' - '1' (launched: true)
[16:22:31]: 'init.svc.bootanim' - 'stopped' (launched: true)
[16:22:31]: $ /Users/F1sherKK/Library/Android/sdk/platform-tools/adb devices | grep [0-9] | tr -s "	" " | cut -d"
[16:22:31]: ▸ emulator-5556 device
[16:22:31]: ▸ emulator-5558 device
[16:22:31]: AVDs Booted!
[16:22:31]: Starting tests
(...)
  • I have added 3 new optional parameters that you can put in your fastfile:
    • AVD_wait_for_bootcomplete
    • AVD_wait_for_boot_completed
    • AVD_wait_for_bootanim
      They are by default set to true. If you set any of them to false then you can disable wait for specific parameter. If you set false to all then you can skip whole parameter launch process.

Add them like that with any combination you wish:

automated_test_emulator_run(
    (... rest of params)
    AVD_wait_for_bootcomplete: true,
    AVD_wait_for_boot_completed: true,
    AVD_wait_for_bootanim: false
)

from fastlane-plugin-automated-test-emulator-run.

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.