question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to test on multi devices?

See original GitHub issue

When I test on multi devices. It throws the following error: It looks like the error caused by FlutterDriver using “adb forward”.

[debug] [FlutterDriver] D:\Work\AndroidSDK\platform-tools\adb.exe forward tcp:40477 tcp:40477
[debug] [FlutterDriver] Deleting Flutter Driver session
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1586940481702 (16:48:01 GMT+0800 (GMT+08:00))
[debug] [W3C] Encountered internal error running command: Error: Command failed: D:\Work\AndroidSDK\platform-tools\adb.exe forward tcp:40477 tcp:40477
[debug] [W3C] adb.exe: error: more than one device/emulator

When I comment the following codes, It can run. But can’t test flutter code flutterCapabilities.setCapability (“automationName”, “Flutter”);

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hex0ctercommented, Jan 26, 2021

@jstephancc this is how I tested it locally:

  • clone the repo
  • go to the driver folder
  • run npm link
  • Find out where you appium is installed (this is different for command line and appium desktop, also related how your nodejs is configured. I am using nvm). In my case which appium suggests it is installed ~/.nvm/versions/node/v12.16.2/bin/appium. Based on that I can tell the appium-flutter-driver is in ~/.nvm/versions/node/v12.16.2/lib/node_modules/appium/node_modules/appium-flutter-driver
  • run rm -r ~/.nvm/versions/node/v12.16.2/lib/node_modules/appium/node_modules/appium-flutter-driver
  • create a symbolic file ln -s <repo path>/driver ~/.nvm/versions/node/v12.16.2/lib/node_modules/appium/node_modules/appium-flutter-driver
  • Next time you run the tests, appium should pick up what you have locally.

Hope this helps.

1reaction
jstephancccommented, Jan 26, 2021

@shibupanda if you will be able to debug this code, please check if this function is called during this issue. It might be a issue, that method is called from appium-base instead of your implementation ?

Please let me know, can i help you somehow ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multi-device testing | Android Open Source Project
Effective multi-Android tests involve communication between allocated devices. When developing such tests, you must determine how to establish ...
Read more >
6 Tools for Rapid Cross-Device Website Testing
6 Tools for Rapid Cross-Device Website Testing · 1. Multi-Screen Test · 2. Responsinator · 3. Google Dev Tools · 4. Browser Stack...
Read more >
Running tests on multiple devices in parallel - IBM
Open the test. In the test editor, click Run Test. ; In the Run configuration wizard, select Run on several devices in parallel....
Read more >
Running Tests on Multiple Devices (Legacy)
It is important to test a mobile application on different devices (smartphones, tablets and other devices) to ensure that it works correctly on...
Read more >
How To Test Your Website Display on Multiple Devices
With Screenfly, you will find it easy to test the design across multiple devices, and it's all in real-time, fully interactive. Simply type...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found