peartherapeutics / bitrise-aws-device-farm-runner

Custom Bitrise step to run tests on aws device farm
MIT License
10 stars 20 forks source link

undocumented input cause fail? #11

Closed carlbenson closed 7 years ago

carlbenson commented 7 years ago

Trying to use this build step in my CI env., but it fails. It's probably because I don't understand what I should use as test_package_name.

It responds with max() arg is an empty sequence

+------------------------------------------------------------------------------+
| (12) aws-device-farm-runner@0.0.2                                            |
+------------------------------------------------------------------------------+
| id: aws-device-farm-runner                                                   |
| version: 0.0.2                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2016-12-06T17:20:58Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[17:20:58] Start installing (awscli) with apt-get       
INFO[17:20:58]  * [OK] Step dependency (aws) installed, available. 

Configs:
  * access_key_id: ***
  * secret_access_key: ***
  * device_farm_project: arn:aws:devicefarm:us-west-2:791829917870:project:***
  * test_package_name: /bitrise/deploy/app-debug-androidTest.apk
  * test_type: INSTRUMENTATION
  * platform: android
  * ipa_path: 
  * ios_pool: 
  * apk_path: /bitrise/deploy/app-debug-androidTest.apk
  * android_pool: arn:aws:devicefarm:us-west-2:791829917870:devicepool:***
  * run_name_prefix: 
  * build_version: 131
  * aws_region: us-west-2

  AWS region (us-west-2) specified!

max() arg is an empty sequence
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | aws-device-farm-runner@0.0.2 (exit code: 255)                 | 1.74 sec |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...com/peartherapeutics/bitrise-aws-device-farm-runner/issues |
| Source: https://github.com/peartherapeutics/bitrise-aws-device-farm-runner   |
+---+---------------------------------------------------------------+----------+
fadookie commented 7 years ago

Glad you seem to have figured this out. You're the third person that was confused by this so I've updated the docs to try to clarify things, hope this helps: https://github.com/peartherapeutics/bitrise-aws-device-farm-runner/pull/12

crysxd commented 7 years ago

@fadookie Still took me some time to figure out the issue, would it be possible to print a better error message? The description makes it pretty clear, though.

ChannVincent commented 7 years ago

Sorry to bother,

I have the same issue, but I don't understand the bugfix : https://github.com/peartherapeutics/bitrise-aws-device-farm-runner/pull/12/commits/e225f4065b7a95789fdedb976bf5eecadb3a131d. I am currently testing the AWS device farm sample with Espresso tests included : https://github.com/awslabs/aws-device-farm-sample-app-for-android.

From this demo I have put in "test_package_name", the package name specified in android manifest : "com.amazonaws.devicefarm.android.referenceapp" It doesn't seems to work.

Can you help me ? =)

capture d ecran 2017-05-31 a 18 34 51

fadookie commented 7 years ago

@ChannVincent test_package_name is supposed to be the file name (basename, not path) of the test package uploaded by the aws-device-farm-file-deploy step, which should run earlier in the workflow.

It's become very clear this is confusing for most users. It stems from the fact that at our company, the test package is maintained by a separate team in a separate repo from the app. I don't have time right now to change this myself but I'd love a PR to incorporate the test upload into this step directly, if it's done in a backwards-compatible manner. See https://github.com/peartherapeutics/bitrise-aws-device-farm-runner/pull/23#issuecomment-308203763

fadookie commented 7 years ago

@crysxd Sorry about the cryptic error message, it comes from the way I'm using the aws-cli at https://github.com/peartherapeutics/bitrise-aws-device-farm-runner/blob/master/step.sh#L101 - I suppose I could check for an error on that specific command and insert a hint about fixing test_package_name. I'll open an issue for this but I don't know if/when I'll have time to do it... a PR would be nice!