I'm trying to connect my project to AWS, but jars could not be found

Now in order to upload the generated zip file for Your Android Appium Java TestNG Tests, Please follow the below steps:

  1. Sign in to the Device Farm console at https://console.aws.amazon.com/devicefarm.
  2. In the list of projects, choose the option next to the project where you want to upload your tests.
  3. If the Create a new run button is displayed, then choose it.
  4. On the Choose your application page, choose Upload.
  5. Browse to and choose your Android app file. The file must be an .apk file.
  6. Now Choose Next step.
  7. On the Configure a test page, choose Appium Java TestNG, and then choose Upload.
  8. Browse to and choose the .zip file that contains your tests. The .zip file must follow the format described in Prepare Your Android Appium Java TestNG Tests.
  9. Choose Next step, and then complete the remaining on-screen instructions to select devices and start the run.
1 Like

@Abdul_Sathar_Beigh : Thank you for clarification, i follow those steps but the problem : the only test case i put in my project “sign in” with the correct credentials isn’t working element could not be found !

Looks like, its the problem in your script. Download the logs and debug it. :wink:
As I can see in the above screenshot, your given xpath is not matching with the application.

Regards
@Abdul_Sathar_Beigh

@emna_ayadi
Will you show the test class that contains ‘Sign In’ test.

Hi , how would i create this zip.xml file …please elaborate as i am new to this

http://blog.bimarian.com/my-first-encounter-with-aws-device-farm/
Check this tutorial, you have to create a maven project first

i have developed this and this is the errors i am getting

[INFO] Scanning for projects…
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building AndroidTestAws 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] — maven-clean-plugin:2.5:clean (default-clean) @ AndroidTestAws —
[INFO] Deleting C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target
[INFO]
[INFO] — maven-resources-plugin:2.6:resources (default-resources) @ AndroidTestAws —
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\src\main\resources
[INFO]
[INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ AndroidTestAws —
[INFO] No sources to compile
[INFO]
[INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ AndroidTestAws —
[INFO] Not copying test resources
[INFO]
[INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ AndroidTestAws —
[INFO] Not compiling test sources
[INFO]
[INFO] — maven-surefire-plugin:2.12.4:test (default-test) @ AndroidTestAws —
[INFO] Tests are skipped.
[INFO]
[INFO] — maven-jar-plugin:2.6:jar (default-jar) @ AndroidTestAws —
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\AndroidTestAws-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] — maven-jar-plugin:2.6:test-jar (default) @ AndroidTestAws —
[INFO] Skipping packaging of the test-jar
[INFO]
[INFO] — maven-dependency-plugin:2.10:copy-dependencies (copy-dependencies) @ AndroidTestAws —
[INFO] Copying commons-lang3-3.4.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\commons-lang3-3.4.jar
[INFO] Copying selenium-leg-rc-2.46.0.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\selenium-leg-rc-2.46.0.jar
[INFO] Copying jna-platform-4.1.0.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\jna-platform-4.1.0.jar
[INFO] Copying netty-3.5.2.Final.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\netty-3.5.2.Final.jar
[INFO] Copying sac-1.3.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\sac-1.3.jar
[INFO] Copying httpclient-4.3.3.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\httpclient-4.3.3.jar
[INFO] Copying java-client-3.1.0.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\java-client-3.1.0.jar
[INFO] Copying bsh-2.0b4.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\bsh-2.0b4.jar
[INFO] Copying selenium-htmlunit-driver-2.46.0.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\selenium-htmlunit-driver-2.46.0.jar
[INFO] Copying commons-collections-3.2.1.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\commons-collections-3.2.1.jar
[INFO] Copying selenium-safari-driver-2.46.0.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\selenium-safari-driver-2.46.0.jar
[INFO] Copying guava-17.0.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\guava-17.0.jar
[INFO] Copying selenium-firefox-driver-2.46.0.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\selenium-firefox-driver-2.46.0.jar
[INFO] Copying htmlunit-2.17.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\htmlunit-2.17.jar
[INFO] Copying commons-exec-1.3.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\commons-exec-1.3.jar
[INFO] Copying xercesImpl-2.11.0.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\xercesImpl-2.11.0.jar
[INFO] Copying xml-apis-1.4.01.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\xml-apis-1.4.01.jar
[INFO] Copying websocket-client-9.2.11.v20150529.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\websocket-client-9.2.11.v20150529.jar
[INFO] Copying cglib-nodep-2.1_3.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\cglib-nodep-2.1_3.jar
[INFO] Copying httpcore-4.3.2.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\httpcore-4.3.2.jar
[INFO] Copying cssparser-0.9.16.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\cssparser-0.9.16.jar
[INFO] Copying commons-io-2.4.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\commons-io-2.4.jar
[INFO] Copying htmlunit-core-js-2.17.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\htmlunit-core-js-2.17.jar
[INFO] Copying jcommander-1.27.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\jcommander-1.27.jar
[INFO] Copying selenium-chrome-driver-2.46.0.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\selenium-chrome-driver-2.46.0.jar
[INFO] Copying selenium-remote-driver-2.46.0.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\selenium-remote-driver-2.46.0.jar
[INFO] Copying cglib-3.1.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\cglib-3.1.jar
[INFO] Copying websocket-common-9.2.11.v20150529.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\websocket-common-9.2.11.v20150529.jar
[INFO] Copying serializer-2.7.2.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\serializer-2.7.2.jar
[INFO] Copying testng-6.8.8.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\testng-6.8.8.jar
[INFO] Copying selenium-api-2.46.0.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\selenium-api-2.46.0.jar
[INFO] Copying httpmime-4.4.1.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\httpmime-4.4.1.jar
[INFO] Copying webbit-0.4.14.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\webbit-0.4.14.jar
[INFO] Copying commons-logging-1.1.3.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\commons-logging-1.1.3.jar
[INFO] Copying xalan-2.7.2.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\xalan-2.7.2.jar
[INFO] Copying websocket-api-9.2.11.v20150529.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\websocket-api-9.2.11.v20150529.jar
[INFO] Copying jetty-io-9.2.11.v20150529.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\jetty-io-9.2.11.v20150529.jar
[INFO] Copying selenium-ie-driver-2.46.0.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\selenium-ie-driver-2.46.0.jar
[INFO] Copying selenium-java-2.46.0.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\selenium-java-2.46.0.jar
[INFO] Copying nekohtml-1.9.22.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\nekohtml-1.9.22.jar
[INFO] Copying gson-2.2.4.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\gson-2.2.4.jar
[INFO] Copying jna-4.1.0.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\jna-4.1.0.jar
[INFO] Copying commons-codec-1.6.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\commons-codec-1.6.jar
[INFO] Copying selenium-support-2.46.0.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\selenium-support-2.46.0.jar
[INFO] Copying asm-4.2.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\asm-4.2.jar
[INFO] Copying jetty-util-9.2.11.v20150529.jar to C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\target\dependency-jars\jetty-util-9.2.11.v20150529.jar
[INFO]
[INFO] — maven-assembly-plugin:2.5.4:single (default) @ AndroidTestAws —
[INFO] Reading assembly descriptor: src/main/assembly/zip.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.581 s
[INFO] Finished at: 2016-02-16T13:22:22+05:30
[INFO] Final Memory: 17M/232M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile “production” could not be activated because it does not exist.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.4:single (default) on project AndroidTestAws: Error reading assemblies: Error locating assembly descriptor: src/main/assembly/zip.xml
[ERROR]
[ERROR] [1] [INFO] Searching for file location: C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\src\main\assembly\zip.xml
[ERROR]
[ERROR] [2] [INFO] File: C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\src\main\assembly\zip.xml does not exist.
[ERROR]
[ERROR] [3] [INFO] File: C:\Users\abhinav.singh\Appium suit\Appium_Mobile_testing\src\main\assembly\zip.xml does not exist.
[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/MojoExecutionException

i have the code to make zip.xml just tell me where to put that and then how to RUN…@Abdul_Sathar_Beigh

Hi Abhnav,

Have you created the zip.xml file?
If not, Please create the file manually in src/main/assembly. Code for zip.xml file, I have already posted above.
If yes, Please post your pom.xml…

According to the Error log, its just a path issue.

Regards,
@Abdul_Sathar_Beigh

Hi Abdul i have created and updated successfully, but i am not getting the screenshots. please tell me where should i put this code for screenshot and also what i need to change in the code.

public boolean takeScreenshot(final String name) {
String screenshotDirectory = System.getProperty(“appium.screenshots.dir”, System.getProperty(“java.io.tmpdir”, “”));
File screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
return screenshot.renameTo(new File(screenshotDirectory, String.format("%s.png", name)));

i made a program to login in my application and i can not see any screenshot only two suites it is showing first is “Setup suite” and second is “Teardown suite”. what it means that my script is not running in the device farm.

@Abdul_Sathar_Beigh Please reply

Hi Abhinav,

Sorry for late reply. I was kind of busy.
Are you still facing the issue?

@Abdul_Sathar_Beigh Yes still i am facing the same issue.no screenshot is coming.

1 Like

@Abdul_Sathar_Beigh Please reply

I’m trying to connect my project to AWS, but jars could not be found(There was a problem processing your file. Could not find test jar)

While i try to upload my test cases in .zip format in AWS it tells me that There was a problem processing your file. Could not find test jar.

i am new to AWS,So any body help me what steps exactly i follow.
my project is java project.

I think you should create a Maven Project.
See this link : https://www.linkedin.com/pulse/getting-started-aws-device-farm-using-appium-page-model-koch-ctfl?deepLinkCommentId=6092268400254427136&anchorTime=1452509975504&trk=hb_ntf_MEGAPHONE_REPLY_TOP_LEVEL_COMMENT

Hi can u please provide me the steps to create maven project.

Hi Can any body tell me how in AWS detecting the device name and version,
while i m running in a real device all my test cases passed,but same test cases while i m running in AWS server ,all my testcases got failed,so what should i give in device name and version .because my testcases running on different devices,and different devices having different name and version,so what should i write in my testcases so it will run in every devices.
ex:public class Test1 {

@Test(priority=0)

public void ad() throws MalformedURLException, InterruptedException {
	DesiredCapabilities c = new DesiredCapabilities();
	c.setCapability(CapabilityType.BROWSER_NAME,"");
	c.setCapability("deviceName","");
	c.setCapability("platformName","Android");
	c.setCapability("platformVersion","4.2.2");
	c.setCapability("appPackage","com.asdf");
	c.setCapability("appActivity","com.LoginActivity");

pl reply its urgent,Thanks in advance.

I believe you need not to provide details like deviceName , patformName etc for device farm and to test locally you need to launch appium in pre-launch mode.

" #### Driver Configuration
Remember to set up your Appium driver correctly. AWS Device Farm takes care of the configuration for you, and you don’t need to set any of the DesiredCapabilities when creating the driver. Refer to this example."

@Abhinav_Singh Did you find your problem. I am also facing the same issue. it seems nothing is happening , no script is running but on local every test is working fine.

Hi Abdul .I am also facing same issue so help me.i have created and updated successfully, but i am not getting the screenshots. please tell me where should i put this code for screenshot and also what i need to change in the code.

public boolean takeScreenshot(final String name) {
String screenshotDirectory = System.getProperty(“appium.screenshots.dir”, System.getProperty(“java.io.tmpdir”, “”));
File screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
return screenshot.renameTo(new File(screenshotDirectory, String.format("%s.png", name)));

Thanking You