Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting "java.io.IOException: Cannot run program "adb": error=2, No such file or directory" #3

Closed
VinitSandesara opened this issue Jan 7, 2016 · 7 comments
Labels

Comments

@VinitSandesara
Copy link

Hi Sai, Thanks for sharing this awesome parallel execution solution however when i tried to run your project on Mac OS i am getting "java.io.IOException: Cannot run program "adb": error=2, No such file or directory" on "adb" command run thru Java program, can you please provide some solution so i can give it a try and apply this same login in my work project.

Note : When i try to run project thru maven command in terminal i don't get any error but when i try to run it in eclipse for debug purpose i am getting above error.

Thanks
Vinit

@saikrishna321
Copy link
Member

@VinitSandesara to run the tests from eclipse, u need to set the ANDROID_HOME in environment of eclipse. Right Click in Runner.java --> Run Configuration --> Set ANDROID_HOME under environment please refer the screenshot.

screen shot 2016-01-08 at 10 53 49 am

@VinitSandesara
Copy link
Author

Thanks you so much Sai for your time to replied on my question, Yes, it has resolved the issue.

I tried to execute @test method thru "parallel" and "distribute" both works the way it was implemented however for distribute instead of distributing per class can we distribute per @test method

  • Lets say i have 2 class each are having total 6 @test method ( class 1 with 6 @test method and class 2 with 6 @test method) so total 12 @test method are available to execute on lets say 3 connected android devices but i wanna execute all these 12 @test method parallel means if the 1st device took one @test method it should not execute on other connected devices, as soon as device finished executing @test method it should start execute one on pipeline (waiting) and this way all 3 devices continue executing until there is no @test method left to be execute in pipeline (waiting).

Note : the project i work on we have this requirement to follow, if you can please help Sai, i really appreciated if there is any workaround you can provide me for above.

Thanks
Vinit

@saikrishna321
Copy link
Member

@VinitSandesara so what i understand from your above question is you want all the @test methods from all classes to get distributed across devices ? If Yes, then yeah this feature will be a part of the framework soon.As there is a bug in java_client

Please take a look at this issue link below
appium/java-client#283

Can you please open a new issue with the above request so that it gets easy to track

@VinitSandesara
Copy link
Author

Hi Sai, I have raised new issue with subject "How to distribute all the @test methods from all classes across all connected devices in parallel ?".

Thanks
Vinit

@HKRecharla
Copy link

Even after Setting Android_Home in Eclipse.. Still i am getting same error..

Some one help

@Kitty2014
Copy link

add your full adb path
such as below
Process process = Runtime.getRuntime().
exec("/Users/XXX/Desktop/00Build_Android/android-sdk-macosx/platform-tools/adb pull /storage/emulated/0/Download/statistic.json ./actual/statistic.json");

@VinayakHM
Copy link

Even after Setting Android_Home in Eclipse.. Still i am getting same error..

Some one help
Try to Run eclipse from command prompt it will work.
you will run adb from command prompt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants