I've cloned the latest version from github and run gradlew test. 59 of 120 tests fail, here is output https://gist.github.com/artkoshelev/45d387c080580c7d13b336745c492450
Hi @artkoshelev
It is not the bug. This is probably the issue of your environment.
Why does it happen?
It cann't find the main.js file.
Ways to resolve the problem:
npm root -g. It will show you the path to the directory where packages are installed by default. Then please check it. There should be the directory /appium/lib which contains main.js. If there is no such directory or file then appium should be installed globally via npm or you can place required files and folders to the directory.main.js.It's quite weird to depend on some js code to exist in java library
anyway, after installing appium with npm -g appium i still got 59 tests failed https://gist.github.com/artkoshelev/7e406524f9ad8aba5c3d714ee5ebf3e7
Strange.
However there is another exception.
Previous:
io.appium.java_client.service.local.InvalidServerInstanceException
Caused by: java.io.IOException
Now
org.openqa.selenium.WebDriverException
@artkoshelev Can you provide java stacktrace?
May be there is some server output. Could you show it too.
Please attach gists if you can
I've figured out i need an android device connected as well, and now i need to install some app's inside. Is there any description of all the ENV i need to setup manually before running tests?
@artkoshelev
ENV settings are described here, here and here.
All the appium setup instructions you can find in this directory.
and now i need to install some app's inside
I can't understand it :) If an app is defined at capabilities then it should be installed by appium automatically. Please clarify it.
I took different device and run a single test ./gradlew test -Dtest.single=AndroidActivityTest but 2 of 4 tests failed with the following stacktrace https://gist.github.com/artkoshelev/9b6a3b324a8f60e80f75e97c62d3a509
You have a short description in README.md file on how to run tests for this library:
Running tests
Run a test using
gradle clean -Dtest.single=IOSAlertTest test
There is nothing about you need to have appium installed and device connected.
There is nothing about you need to have appium installed and device connected.
It's a basic that appium tests will only run if appium is installed and should have device connected or emulator/simulator running or installed.
It's a basic that appium tests will only run if appium is installed and should have device connected or emulator/simulator running or installed.
It's not appium but java library. All it's job is just translate java calls into selenium remote calls. So all you need to test is correctness of this translation.
@artkoshelev What's your concern here?
@artkoshelev
There is nothing about you need to have appium installed and device connected.
Yes. Now we run tests locally. Appium is usually installed on a computer and some device is connected. We are going to run it using remote CI and Sauce Labs environment. We have lack of time but we are going to put an end to this.
I think it is our fault and we have to describe env requirements to run java_client tests and provide useful links. Sorry.
About the problem which was described in the gist. Is it reproduced on Android emulator?
About the problem which was described in the gist. Is it reproduced on Android emulator?
Nope, but there are other failed tests on emulator, e.g.
org.junit.ComparisonFailure: expected:<[ON]> but was:<[I]>
at org.junit.Assert.assertEquals(Assert.java:115)
at org.junit.Assert.assertEquals(Assert.java:144)
at io.appium.java_client.android.AndroidGestureTest.reusableTapTest(AndroidGestureTest.java:103)
@SrinivasanTarget i want to contribute to the project, but can't even see green tests before starting.
@artkoshelev
So this ticket is related to https://github.com/appium/java-client/issues/325
@TikhomirovSergey yep, looks so