0

When i tried to upload my maven project getting an exception like

There was a problem processing your file. We could not find a *-tests.jar file in the root of your test package. Please unzip your test package, verify that at least one *-tests.jar file is in the root of your package, and try again.

But i have created my Clubcard-1.0-SNAPSHOT-tests.jar and which is stored under target folder.

Also tried locating the jar file under root folder but still getting same issue

Lucan
  • 99
  • 1
  • 3
  • 12

2 Answers2

1

Have you packaged your tests per the AWS Device Farm instructions for TestNG or for JUnit? Please make sure you run mvn clean package –-DskipTests=true to construct the package that is uploaded.

Rohan Deshpande
  • 3,535
  • 1
  • 26
  • 31
  • @NikofTime and @Rohan i tried the following [Link](http://docs.aws.amazon.com/devicefarm/latest/developerguide/test-types-android-appium-java-junit.html) to create a *tests.jar and to run my script i use `mvn test -DtestNG.file=/path/to/testng.xml` – Lucan Aug 24 '16 at 07:26
1

You uploaded the wrong zip file. Did you just try to upload your MAVEN project?

No, it should be a zip file named zip-with-dependencies.zip under target folder of your maven project. For example, \Desktop\Appium-myApp\target\zip-with-dependencies.zip.

If you didn't find your zip-with-dependencies.zip, you have to package with maven command

  1. Read the document of Amazon Device Farm, you have to setup your pom.xml first
  2. cd to your maven directory in Terminal or command prompt
  3. mvn clean package –-DskipTests=true to package into a *-tests.jar and zip-with-dependencies.zip

Finally, upload this zip-with-dependencies.zip to Amazon Device Farm.

Kelvin Low
  • 390
  • 6
  • 22