Integrating AWS device farm with Jenkins - android

I want to integrate my Jenkins build with AWS device farm. So, while creating a project on AWS device farm, it asks to upload the apk to test. I want that the apk should be picked from Jenkins server location and I don't have to manually upload apk to AWS device farm.
Is this possible?

Yes, you can configure Jenkins to upload your compiled application to AWS Device Farm. Install the AWS Device Farm Jenkins plugin and set Application to **/app-debug-unaligned.apk.
You can also watch our Jenkins integration webinar for more information.

To create a Project in AWS device farm is mandatory to upload an APK to proceed with the project creation.
The same will happen with the device pool, you can create a device pool only after creating a Run.
After you create that all this information will be available in Jenkins Server (of course after Authentication and plug in installed)
Another was is using AWS CLI but I can't give you more information as I haven't used yet

Related

How to pull the apk file from appcenter and get it installed on android device instead of manually downloading and storing in local and installing

For automation testing purposes presently I am downloading the latest build from appcenter and storing it in my local. And in the script I am getting it installed on the android device. But this will not workout when I want to run the script through pipeline.
Is there any way to get the apk downloaded directly from appcenter and have it installed into the device.
App Center is a continuous integration, delivery, and testing solution for Android, iOS, macOS, and Windows apps. App Center let developers to ship apps faster and with more confidence by automating the development life cycle.
You can't directly download from app center and install it to android device. But you can upload your application binary package to app center and distribute it. You can distribute releases to individual testers or groups of testers. Azure DevOps uses the App Center Distribute Task for this.
Check Build, test, and deploy Android apps - Azure Pipelines document for more information.
This might be helpful in your case if you would like to upload the build from app center and run your test on real device or simulator:
https://www.browserstack.com/docs/app-automate/appium/integrations/app-center

AWS device farm cannot find .xctest in ipa

I am using aws device farm to test my iOS and android application.
It asks for the .ipa for xctest and xctestUI test cases which I provide by compiling them in xcode and exporting them under adhoc distribution.
Every time I drag and drop it I get that either the plugin folder is missing (fo UI testing) or that the .xctest directory is missing.
Is there a way to have everything included when using xcode to export?

How to configure AWS Device Farm for testing Android native apps like Calculator?

I am new to Appium and I am trying to run manual and automated tests on the AWS Device Farm. While I am trying to 'Create a new run', it wants me to upload an apk file.
Create a new run
But, when upload the apk and run the test, it gives me the below error during the 'Setup Suite' phase.
Error:
Package com.google.android.calculator is already installed as a default system app
Error message
Please let me know if you need additional info that I may have missed to resolve the issue. Many thanks in anticipation!
You are seeing this error because you're uploading a system app that is already installed on the device.
There is a work around where you could upload a dummy apk and in your Appium tests specifically target the calculator app.

How do I get code coverage of AWS Device Farm tests with Android?

I am running instrumentation tests on AWS Device Farm and can download the results of the tests but do not see any *.exec or *.ec files in the results. This is what I typically see when running tests locally with an attached device/emulator using Gradle.
Does AWS Device Farm support code coverage?
I work for the AWS Device Farm team.
Unfortunately, that artifact isn't exposed yet on device farm.
I have made a note of it in our product backlog.
I am curious if you can obtain the same thing if you were not running from Android studio at all.

How to push a file to sdcard of a device on AWS Device farm from Jenkins task

I am running some instrumentation tests on AWS Device farm from my Jenkins task. Everything works fine. Now for some of the testcases, I need to put a file to sdcard of the device.
So, how to push a file to a sdcard of a device on "AWS Device Farm from jenkins machine. I have the AWS CI plugin installed on my jenkins machine.
Thanks for any help
You would use the Extra Data parameter in the ScheduleRun API to push files to the device sdcard.
The AWS Device Farm Jenkins plugin does not support Extra Data uploads at this time. We are working on adding support but no ETA at this time. The plugin is open source so if you'd like to submit a pull request, we will be happy to take a look.

Categories

Resources