Giter Site home page Giter Site logo

email2vimalraj / appium-stf-example Goto Github PK

View Code? Open in Web Editor NEW
80.0 80.0 40.0 2.16 MB

Mobile Automation using Appium on OpenSTF

Home Page: http://www.vimalselvam.com/2016/08/07/appium-parallel-execution-on-openstf/

License: Apache License 2.0

Java 100.00%

appium-stf-example's People

Contributors

email2vimalraj avatar itsjw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appium-stf-example's Issues

When I running the code, it says "0 device(s) connected"

Hi,
thanks for hte very good sample.
But when I running the code, it says "0 device(s) connected", can you help for this.

thanks.


The device is locked successfully
[Appium] Welcome to Appium v1.6.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/status {}
[MJSONWP] Calling AppiumDriver.getStatus() with args: []
[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.6.0","revision":null}}
this.service.getUrl(): http://0.0.0.0:4723/wd/hub
[HTTP] <-- GET /wd/hub/status 200 109 ms - 83
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"D:\WorkSpace\appium-stf-example\src\test\resources\ApiDemos-debug.apk","platformName":"Android","udid":"FA48TSR00335","deviceName":"ANDROID"}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"D:\WorkSpace\appium-stf-example\src\test\resources\ApiDemos-debug.apk","platformName":"Android","udid":"FA48TSR00335","deviceName":"ANDROID"},null,null,null]
[Appium] Creating new AndroidDriver session
[Appium] Capabilities:
[Appium] app: 'D:\WorkSpace\appium-stf-example\src\test\resources\ApiDemos-debug.apk'
[Appium] platformName: 'Android'
[Appium] udid: 'FA48TSR00335'
[Appium] deviceName: 'ANDROID'
[debug] [AndroidDriver] AndroidDriver version: 1.10.30
[BaseDriver] Session created with session id: 1708f4b9-8575-4fdc-9e45-596c476c7ae9
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_112
[ADB] Checking whether adb is present
[ADB] Using adb.exe from F:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...

Got [0 device connected] when running script on another machine

Thank you for creating this sample project. It's amazing!
I tested on the host where devices plugged and the test was successfully.

But when I run script from another PC. I could see it reserved the device [saw "Stop Using status"] but there was no device connected (even tried with adb devices command manually).

Could you possibly help me to point out where I need to do to narrow down the issue.

Thank you so much!

STF has an error when I run mvn clean test

I successfully started STF,and I run "mvn clean test",

[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< com.vimalselvam:appium-stf-example >-----------------
[INFO] Building appium-stf-example 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ appium-stf-example ---
[INFO] Deleting /usr/local/stf/test_code/appium-stf-example/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ appium-stf-example ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /usr/local/stf/test_code/appium-stf-example/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ appium-stf-example ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 2 source files to /usr/local/stf/test_code/appium-stf-example/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ appium-stf-example ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ appium-stf-example ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /usr/local/stf/test_code/appium-stf-example/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ appium-stf-example ---
[INFO] Surefire report directory: /usr/local/stf/test_code/appium-stf-example/target/surefire-reports


T E S T S

Running com.vimalselvam.stf.AndroidTest
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@626b2d4a
Dec 19, 2018 6:45:21 PM com.vimalselvam.DeviceApi addDeviceToUser
INFO: The device <68UDU17A19008448> is locked successfully
[Appium] Welcome to Appium v1.6.5
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/status
[HTTP] {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.6.5","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 24 ms - 83
[HTTP]
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"app":"/usr/local/stf/test_code/appium-stf-example/src/test/resources/ApiDemos-debug.apk","platformName":"Android","udid":"68UDU17A19008448","deviceName":"ANDROID"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/usr/local/stf/test_code/appium-stf-example/src/test/resources/ApiDemos-debug.apk","platformName":"Android","udid":"68UDU17A19008448","deviceName":"ANDROID"},null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1545216324591 (18:45:24 GMT+0800 (CST))
[Appium] Creating new AndroidDriver (v1.40.1) session
[Appium] Capabilities:
[Appium] app: '/usr/local/stf/test_code/appium-stf-example/src/test/resources/ApiDemos-debug.apk'
[Appium] platformName: 'Android'
[Appium] udid: '68UDU17A19008448'
[Appium] deviceName: 'ANDROID'
[debug] [BaseDriver] W3C capabilities [] and MJSONWP desired capabilities were provided
[BaseDriver] Falling back to MJSONWP desired capabilities
[BaseDriver] Session created with session id: cc5aec51-0f69-41ac-b9d3-7bd954326caf
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_191
[ADB] Checking whether adb is present
[ADB] Found 6 'build-tools' folders under '/usr/local/stf/android-sdk-linux' (newest first):
[ADB] /usr/local/stf/android-sdk-linux/build-tools/28.0.3
[ADB] /usr/local/stf/android-sdk-linux/build-tools/27.0.0
[ADB] /usr/local/stf/android-sdk-linux/build-tools/24.0.2
[ADB] /usr/local/stf/android-sdk-linux/build-tools/24.0.1
[ADB] /usr/local/stf/android-sdk-linux/build-tools/24.0.0
[ADB] /usr/local/stf/android-sdk-linux/build-tools/23.0.3
[ADB] Using adb from /usr/local/stf/android-sdk-linux/platform-tools/adb
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [AndroidDriver] Shutting down Android driver
[debug] [AndroidDriver] Called deleteSession but bootstrap wasn't active
[MJSONWP] Encountered internal error running command: Error: Could not find a connected Android device.
[MJSONWP] at getDevices (/usr/local/stf/node-v9.11.2-linux-x64/lib/node_modules/appium/node_modules/_appium-adb@6.29.1@appium-adb/lib/tools/system-calls.js:195:13)
[MJSONWP] at getDevices (/usr/local/stf/node-v9.11.2-linux-x64/lib/node_modules/appium/node_modules/_appium-adb@6.29.1@appium-adb/lib/tools/system-calls.js:212:20)
[MJSONWP] at
[HTTP] <-- POST /wd/hub/session 500 24704 ms - 179
[HTTP]
Tests run: 4, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 28.285 sec <<< FAILURE!
setup(com.vimalselvam.stf.AndroidTest) Time elapsed: 28.183 sec <<< FAILURE!
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not find a connected Android device. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 24.83 seconds
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'ubuntu', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-139-generic', java.version: '1.8.0_191'
Driver info: io.appium.java_client.android.AndroidDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:51)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:144)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:47)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:114)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:132)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:97)
at com.vimalselvam.stf.AndroidTest.setup(AndroidTest.java:61)

Results :

Failed tests: setup(com.vimalselvam.stf.AndroidTest): An unknown server-side error occurred while processing the command. Original error: Could not find a connected Android device. (WARNING: The server did not provide any stacktrace information)(..)

Tests run: 4, Failures: 1, Errors: 0, Skipped: 3

And STF's log is

FTL/util:lifecycle 30122 [] Tracker had an error Error: Connection closed
at /usr/local/stf/stf-master/node_modules/adbkit/lib/adb/tracker.js:21:13
at tryCatcher (/usr/local/stf/stf-master/node_modules/adbkit/node_modules/bluebird/js/main/util.js:26:23)
at CatchFilter.doFilter (/usr/local/stf/stf-master/node_modules/adbkit/node_modules/bluebird/js/main/catch_filter.js:40:36)
at CatchFilter.tryCatcher (/usr/local/stf/stf-master/node_modules/adbkit/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/usr/local/stf/stf-master/node_modules/adbkit/node_modules/bluebird/js/main/promise.js:503:31)
at Promise._settlePromiseAt (/usr/local/stf/stf-master/node_modules/adbkit/node_modules/bluebird/js/main/promise.js:577:18)
at Promise._settlePromises (/usr/local/stf/stf-master/node_modules/adbkit/node_modules/bluebird/js/main/promise.js:693:14)
at Async._drainQueue (/usr/local/stf/stf-master/node_modules/adbkit/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/usr/local/stf/stf-master/node_modules/adbkit/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/stf/stf-master/node_modules/adbkit/node_modules/bluebird/js/main/async.js:15:14)
at runCallback (timers.js:763:18)
at tryOnImmediate (timers.js:734:5)
at processImmediate (timers.js:716:5)
2018-12-19T10:58:41.415Z FTL/util:lifecycle 30122 [
] Shutting down due to fatal error
2018-12-19T10:58:41.419Z FTL/cli:local 30086 [*] Child process had an error ExitError: Exit code "1"
at ChildProcess. (/usr/local/stf/stf-master/lib/util/procutil.js:49:23)
at ChildProcess.emit (events.js:180:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)

Can you tell me the solution? thanks

Just get one device working

First of all thank you for this great example.
I've already implemented, working with STF in a great way
I've already checked my configurations , but something still seems to be wrong in this particular example

I u could give me any feedback I would greatly appreciate it.
Thanks in advance.

I put the console results below:

I've been trying two ways

  1. Method with real serial (not connecting the devices to adb remotely)

Method:

public Object[][] parallelDp() {
return new Object[][] {
{"110102d231a6924a"}, // Change the device serial
{"ZY2232ZZTB"}, // Change the device serial
// {"192.168.15.24:7405"}, // Change the device serial
//{"192.168.15.24:7401"}, // Change the device serial
};
}

Result:


[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building appium-stf-example 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ appium-stf-example ---
[INFO] Deleting /home/server/appium-stf-example/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ appium-stf-example ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/server/appium-stf-example/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ appium-stf-example ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 2 source files to /home/server/appium-stf-example/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ appium-stf-example ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ appium-stf-example ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /home/server/appium-stf-example/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ appium-stf-example ---
[INFO] Surefire report directory: /home/server/appium-stf-example/target/surefire-reports


T E S T S

Running com.vimalselvam.stf.AndroidTest
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@182decdb
Sep 06, 2017 1:40:06 PM com.vimalselvam.DeviceApi addDeviceToUser
INFO: The device <110102d231a6924a> is locked successfully
[Appium] Welcome to Appium v1.6.5
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.6.5","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 57 ms - 83
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/home/server/appium-stf-example/src/test/resources/ApiDemos-debug.apk","platformName":"Android","udid":"110102d231a6924a","deviceName":"ANDROID"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/home/server/appium-stf-example/src/test/resources/ApiDemos-debug.apk","platformName":"Android","udid":"110102d231a6924a","deviceName":"ANDROID"},null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1504723210750 (13:40:10 GMT-0500 (CDT))
[Appium] Creating new AndroidDriver (v1.20.0) session
[Appium] Capabilities:
[Appium] app: '/home/server/appium-stf-example/src/test/resources/ApiDemos-debug.apk'
[Appium] platformName: 'Android'
[Appium] udid: '110102d231a6924a'
[Appium] deviceName: 'ANDROID'
[debug] [AndroidDriver] AndroidDriver version: 1.20.0
[BaseDriver] Session created with session id: b9e211c9-2a7e-4c2f-a38e-e797a0a917c0
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_144
[ADB] Checking whether adb is present
[ADB] Using adb from /home/server/Android/Sdk/platform-tools/adb
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [AndroidDriver] Shutting down Android driver
[debug] [AndroidDriver] Called deleteSession but bootstrap wasn't active
[MJSONWP] Encountered internal error running command: Error: Could not find a connected Android device.
at ADB.getDevices$ (../../../lib/tools/system-calls.js:132:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at enqueueResult (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
at Promise ()
at F (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.export.js:30:36)
at AsyncIterator.enqueue (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at Object.runtime.async (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
at getDevices (../../../lib/tools/system-calls.js:135:18)
at ADB.getDevices$ (../../../lib/tools/system-calls.js:149:20)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
[HTTP] <-- POST /wd/hub/session 500 25672 ms - 179
Tests run: 8, Failures: 1, Errors: 0, Skipped: 7, Time elapsed: 32.067 sec <<< FAILURE!
setup(com.vimalselvam.stf.AndroidTest) Time elapsed: 31.722 sec <<< FAILURE!
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not find a connected Android device. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 26.04 seconds
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'server-VirtualBox', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.10.0-33-generic', java.version: '1.8.0_144'
Driver info: io.appium.java_client.android.AndroidDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:51)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:144)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:47)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:114)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:132)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:97)
at com.vimalselvam.stf.AndroidTest.setup(AndroidTest.java:57)

Results :

Failed tests: setup(com.vimalselvam.stf.AndroidTest): An unknown server-side error occurred while processing the command. Original error: Could not find a connected Android device. (WARNING: The server did not provide any stacktrace information)(..)

Tests run: 8, Failures: 1, Errors: 0, Skipped: 7

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 38.655 s
[INFO] Finished at: 2017-09-06T13:40:37-05:00
[INFO] Final Memory: 21M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project appium-stf-example: There are test failures.
[ERROR]
[ERROR] Please refer to /home/server/appium-stf-example/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException


This one seems to lock just one device, that appears "stop automation" on STF panel. Nothing more

2)Method with ip:port ID (connecting the devices to adb remotely first)

Method:

public Object[][] parallelDp() {
return new Object[][] {
//{"110102d231a6924a"}, // Change the device serial
//{"ZY2232ZZTB"}, // Change the device serial
{"192.168.15.24:7405"}, // Change the device serial
{"192.168.15.24:7401"}, // Change the device serial
};
}

Result:


[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building appium-stf-example 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ appium-stf-example ---
[INFO] Deleting /home/server/appium-stf-example/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ appium-stf-example ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/server/appium-stf-example/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ appium-stf-example ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 2 source files to /home/server/appium-stf-example/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ appium-stf-example ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ appium-stf-example ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /home/server/appium-stf-example/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ appium-stf-example ---
[INFO] Surefire report directory: /home/server/appium-stf-example/target/surefire-reports


T E S T S

Running com.vimalselvam.stf.AndroidTest
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@182decdb
Sep 06, 2017 1:47:21 PM com.vimalselvam.DeviceApi isDeviceFound
SEVERE: Device not found
[Appium] Welcome to Appium v1.6.5
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.6.5","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 67 ms - 83
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/home/server/appium-stf-example/src/test/resources/ApiDemos-debug.apk","platformName":"Android","udid":"192.168.15.24:7405","deviceName":"ANDROID"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/home/server/appium-stf-example/src/test/resources/ApiDemos-debug.apk","platformName":"Android","udid":"192.168.15.24:7405","deviceName":"ANDROID"},null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1504723646262 (13:47:26 GMT-0500 (CDT))
[Appium] Creating new AndroidDriver (v1.20.0) session
[Appium] Capabilities:
[Appium] app: '/home/server/appium-stf-example/src/test/resources/ApiDemos-debug.apk'
[Appium] platformName: 'Android'
[Appium] udid: '192.168.15.24:7405'
[Appium] deviceName: 'ANDROID'
[debug] [AndroidDriver] AndroidDriver version: 1.20.0
[BaseDriver] Session created with session id: 6f05f22c-51d1-45c2-8e79-b0b3cf5ab381
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_144
[ADB] Checking whether adb is present
[ADB] Using adb from /home/server/Android/Sdk/platform-tools/adb
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[AndroidDriver] Using device: 192.168.15.24:7405
[ADB] Checking whether adb is present
[ADB] Using adb from /home/server/Android/Sdk/platform-tools/adb
[debug] [ADB] Setting device id to 192.168.15.24:7405
[BaseDriver] Using local app '/home/server/appium-stf-example/src/test/resources/ApiDemos-debug.apk'
[debug] [AndroidDriver] Checking whether app is actually present
[AndroidDriver] Starting Android session
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","wait-for-device"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","echo","ping"]
[debug] [Logcat] Starting logcat capture
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","pm","list","packages","io.appium.settings"]
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for io.appium.settings
[debug] [ADB] Getting connected devices...
[ADB] Checking whether aapt is present
[ADB] Using aapt from /home/server/Android/Sdk/build-tools/26.0.1/aapt
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","dumpsys","package","io.appium.settings"]
[ADB] Cannot read version codes of /usr/local/lib/node_modules/appium/node_modules/io.appium.settings/app/build/outputs/apk/settings_apk-debug.apk and/or io.appium.settings. Assuming correct app version is already installed
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","getprop","ro.build.version.sdk"]
[debug] [ADB] Device API level: 23
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","dumpsys","package","io.appium.settings"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","pm","dump","io.appium.settings"]
[debug] [ADB] Got the following command chunks to execute: pm,grant,io.appium.settings,android.permission.WRITE_SETTINGS,;,pm,grant,io.appium.settings,android.permission.ACCESS_MOCK_LOCATION,;
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","pm","grant","io.appium.settings","android.permission.WRITE_SETTINGS",";","pm","grant","io.appium.settings","android.permission.ACCESS_MOCK_LOCATION",";"]
[debug] [AndroidDriver] Pushing unlock helper app to device...
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","install","/usr/local/lib/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk"]
[debug] [ADB] Device API level: 23
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","appops","set","io.appium.settings","android:mock_location","allow"]
[ADB] Getting device platform version
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","getprop","ro.build.version.release"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","wm","size"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","getprop","ro.product.model"]
[debug] [ADB] Current device property 'ro.product.model': XT1563
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","getprop","ro.product.manufacturer"]
[debug] [ADB] Current device property 'ro.product.manufacturer': motorola
[debug] [AndroidDriver] Parsing package and activity from app manifest
[ADB] Checking whether aapt is present
[ADB] Using aapt from /home/server/Android/Sdk/build-tools/26.0.1/aapt
[ADB] Extracting package and launch activity from manifest
[debug] [ADB] badging package: io.appium.android.apis
[debug] [ADB] badging act: io.appium.android.apis.ApiDemos
[debug] [AndroidDriver] Parsed package and activity are: io.appium.android.apis/io.appium.android.apis.ApiDemos
[AndroidDriver] Remote apk path is /data/local/tmp/29649242b53e9a67ba855b067422713c.apk
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","ls","/data/local/tmp/29649242b53e9a67ba855b067422713c.apk"]
[debug] [AndroidDriver] Checking if app is installed
[debug] [ADB] Getting install status for io.appium.android.apis
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","pm","list","packages","io.appium.android.apis"]
[debug] [ADB] App is installed
[AndroidDriver] Apk is already on remote and installed, resetting
[debug] [AndroidDriver] Running fast reset (stop and clear)
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","am","force-stop","io.appium.android.apis"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","pm","clear","io.appium.android.apis"]
[debug] [AndroidDriver] Extracting strings from apk /home/server/appium-stf-example/src/test/resources/ApiDemos-debug.apk null /tmp/io.appium.android.apis
[debug] [ADB] Extracting strings for language: default
[debug] [ADB] Device API level: 23
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","getprop","persist.sys.locale"]
[debug] [ADB] Current device property 'persist.sys.locale': es-US
[debug] [ADB] No strings.xml for language 'es', getting default strings.xml
[debug] [ADB] Reading strings from converted strings.json
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","push","/tmp/io.appium.android.apis/strings.json","/data/local/tmp"]
[debug] [AndroidBootstrap] Watching for bootstrap disconnect
[debug] [ADB] Forwarding system: 4724 to device: 4724
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","forward","tcp:4724","tcp:4724"]
[debug] [UiAutomator] Starting UiAutomator
[debug] [UiAutomator] Moving to state 'starting'
[debug] [UiAutomator] Parsing uiautomator jar
[debug] [UiAutomator] Found jar name: 'AppiumBootstrap.jar'
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","push","/usr/local/lib/node_modules/appium/node_modules/appium-android-bootstrap/bootstrap/bin/AppiumBootstrap.jar","/data/local/tmp/"]
[debug] [ADB] Attempting to kill all uiautomator processes
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","ps"]
[ADB] No uiautomator process found to kill, continuing...
[debug] [UiAutomator] Starting UIAutomator
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","192.168.15.24:7405","shell","uiautomator","runtest","AppiumBootstrap.jar","-c","io.appium.android.bootstrap.Bootstrap","-e","pkg","io.appium.android.apis","-e","disableAndroidWatchers",false,"-e","acceptSslCerts",false]
[debug] [UiAutomator] Moving to state 'online'
[AndroidBootstrap] Android bootstrap socket is now connected
[debug] [ADB] Getting connected devices...
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] json loading complete.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","dumpsys","window"]
[AndroidDriver] Screen already unlocked, doing nothing
[debug] [ADB] Device API level: 23
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","am","start","-W","-n","io.appium.android.apis/io.appium.android.apis.ApiDemos","-S","-a","android.intent.action.MAIN","-c","android.intent.category.LAUNCHER","-f","0x10200000"]
[debug] [ADB] Waiting for activity matching pkg: 'io.appium.android.apis' and activity: 'io.appium.android.apis.ApiDemos' to be focused
[debug] [ADB] Possible activities, to be checked: io.appium.android.apis.ApiDemos, io.appium.android.apis.io.appium.android.apis.ApiDemos
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","dumpsys","window","windows"]
[debug] [ADB] Found package: 'io.appium.android.apis' and fully qualified activity name : 'io.appium.android.apis.ApiDemos'
[Appium] New AndroidDriver session created successfully, session 6f05f22c-51d1-45c2-8e79-b0b3cf5ab381 added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1504723665133 (13:47:45 GMT-0500 (CDT))
[debug] [MJSONWP] Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"app":"/home/server/appium-stf-example/src/test/resources/ApiDemos-debug.apk","platformName":"Android","udid":"192.168.15.24:7405","deviceName":"ANDROID"},"app":"/home/server/appium-stf-example/src/test/resources/ApiDemos-debug.apk","platformName":"Android","udid":"192.168.15.24:7405","deviceName":"192.168.15.24:7405","deviceUDID":"192.168.15.24:7405","platformVersion":"6.0.1","deviceScreenSize":"1080x1920","deviceModel":"XT1563","deviceManufacturer":"motorola","appPackage":"io.appium.android.apis","appWaitPackage":"io.appium.android.apis","appActivity":"io.appium.android.apis.ApiDemos","appWaitActivity":"io.appium.android.apis.ApiDemos"}
[HTTP] <-- POST /wd/hub/session 200 18953 ms - 924
[HTTP] --> GET /wd/hub/session/6f05f22c-51d1-45c2-8e79-b0b3cf5ab381/appium/device/current_activity {}
[debug] [MJSONWP] Calling AppiumDriver.getCurrentActivity() with args: ["6f05f22c-51d1-45c2-8e79-b0b3cf5ab381"]
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[debug] [ADB] Running '/home/server/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","192.168.15.24:7405","shell","dumpsys","window","windows"]
[debug] [MJSONWP] Responding to client with driver.getCurrentActivity() result: ".ApiDemos"
[HTTP] <-- GET /wd/hub/session/6f05f22c-51d1-45c2-8e79-b0b3cf5ab381/appium/device/current_activity 200 211 ms - 83
Sep 06, 2017 1:47:45 PM com.vimalselvam.DeviceApi isDeviceFound
SEVERE: Device not found
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.6.5","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 22 ms - 83
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/home/server/appium-stf-example/src/test/resources/ApiDemos-debug.apk","platformName":"Android","udid":"192.168.15.24:7401","deviceName":"ANDROID"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/home/server/appium-stf-example/src/test/resources/ApiDemos-debug.apk","platformName":"Android","udid":"192.168.15.24:7401","deviceName":"ANDROID"},null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1504723667005 (13:47:47 GMT-0500 (CDT))
[Appium] Creating new AndroidDriver (v1.20.0) session
[Appium] Capabilities:
[Appium] app: '/home/server/appium-stf-example/src/test/resources/ApiDemos-debug.apk'
[Appium] platformName: 'Android'
[Appium] udid: '192.168.15.24:7401'
[Appium] deviceName: 'ANDROID'
[HTTP] <-- POST /wd/hub/session 500 16 ms - 193
Tests run: 7, Failures: 1, Errors: 0, Skipped: 5, Time elapsed: 27.662 sec <<< FAILURE!
setup(com.vimalselvam.stf.AndroidTest) Time elapsed: 1.818 sec <<< FAILURE!
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. Details: Problem getting session data for driver type AndroidDriver; does it implement 'get driverData'? (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 41 milliseconds
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'server-VirtualBox', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.10.0-33-generic', java.version: '1.8.0_144'
Driver info: io.appium.java_client.android.AndroidDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:51)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:144)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:47)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:114)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:132)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:97)
at com.vimalselvam.stf.AndroidTest.setup(AndroidTest.java:57)

Results :

Failed tests: setup(com.vimalselvam.stf.AndroidTest): A new session could not be created. Details: Problem getting session data for driver type AndroidDriver; does it implement 'get driverData'? (WARNING: The server did not provide any stacktrace information)(..)

Tests run: 7, Failures: 1, Errors: 0, Skipped: 5

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35.210 s
[INFO] Finished at: 2017-09-06T13:47:48-05:00
[INFO] Final Memory: 20M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project appium-stf-example: There are test failures.
[ERROR]
[ERROR] Please refer to /home/server/appium-stf-example/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException


In this one the devices are previously connected to adb, putting them in "stop using" before test begins
This one also it begins the test on one device, opening the APP, but can't pass to the other device due to the new session problem.

Again thanks in advance!

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.