How do I get code coverage of AWS Device Farm tests with Android? - 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.

Related

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 can I get android GTS test suite?

I have downloaded CTS test suite via CTS download link
But, how can I get android GTS/XTS test suite?
GTS test suite like below pic
Thanks
Like CTS, GTS test suite is not a open source. Hence it is not available for public download. It is only available for the Android partners who have partnered with Google to preload Google mobile applications on android devices.

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.

Integrating AWS device farm with Jenkins

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

Generate UIAutomator Test JAR for AWS Device Farm from Android Studio Gradle build

I would like to run Android UIAutomator Tests with AWS Device Farm. The Tests needs to be uploaded as a separate JAR to AWS. In Android Studio (1.4) UIAutomator Tests are part of the app project itself, so no dedicated JAR is generated.
How can I generate a JAR, that just contains the UIAutomator Tests and meets the requirements of AWS Device Farm?
You'll still be able to execute these tests using AWS Device Farm without converting them to a JAR.
On March 12, 2015, Google announced uiautomator 2.0. Without going into too much detail, the significant change made in this new version is that these tests are based on Android instrumentation (generated as APK files) instead of the previously used system of uiautomator 1.0 (generated as JAR files).
I would have to examine the gradle/build configuration further, but my guess is that you're using the new Android testing libraries and thus, using uiautomator 2.0. When you build a project such as this, it will generate two APK files, one for your application and another for your instrumentation tests.
When using AWS Device Farm, you'll want to take these two APK files and upload them using the INSTRUMENTATION test type. This test type works for all Instrumentation based frameworks/tools such as Espresso, uiautomator 2.0, and Robotium. The UIAUTOMATOR test type is specifically for older uiautomator 1.0 projects that still build and use JAR files for their test packages.

Categories

Resources