Multiple JUnit XML results on Jenkins, publish with separate graph? - android

I have multiple tests running as a part of Android Jenkins build including Unit test and Functional tests. I am able to publish the test results on Jenkins successfully but I want to see seperate result graph for Unit tests and Functional Test. Jenkins JUnit publisher only shows one graph for multiple XML files. Any help?

Related

How can I run integration tests on a JNI Android library?

I need to run integration tests for an Android library that leverages native
code via JNI. This has a few implications:
This is a library, and as such has no GUI whatsoever. This means that test
frameworks like Espresso, Appium and the like are of no use, since there's no
GUI to test against.
This gives me some headaches with popular cloud services like App Center and
Firebase Test Lab, as they require both an UI instrumented test apk, written
with one of the supported UI testing frameworks, and an app apk to run these
tests against.
As said, the library contains C code loaded via JNI. Unfortunately, this
excludes the possibility of using Robolectric, since it doesn't support JNI.
Now there are a few questions:
Are there any Android simulation testing frameworks that support JNI?
Is there a cloud service out there which allows me to simply run a pre-built
Android instrumented unit tests apk, without any UI instrumented test
framework and without an actual app to be tested?
Have I missed a much simpler solution to my problem?
The problem with cloud services is that currently I only have an instrumented
unit test apk, which as such has no actual GUI testing. Furthermore, that's the
sole apk I have, since there's no actual Android app to be tested.
I am not aware of any Android mocking test frameworks, like Robolectric, that
support JNI, which is why I am looking into instrumented tests, on real or
emulated Android devices, in the first place.

How do I run instrumented tests of a module without an accompanying app?

I have made a library project consisting of an Android module and no application. This module relies on Android-specific functionality.
How do I run these tests with Firebase?
It seems like Firebase requires an app apk and a test apk, while I only have a test apk (*-androidTest.apk). I normally run tests locally without issues using ./gradlew connectedCheck.

How to run Espresso instrumentation tests in parallel in Firebase Test Lab?

Currently I run Espresso tests on Firebase / Google Test Lab, but it takes time to run them all, as they run in sequentially.
Is there a way to run them in parallel?
You would need to shard your tests so that you can kick off multiple batches of test that can run in parallel on different devices. Firebase doesn't provide a way to do this directly, but there is an open source project called Flank that can help.

Launch Instrumentation tests from intent

I have a web app that is using Firebase FCM to communicate with my android device.
On receiving a certain data message through Firebase, I need android to run Instrumentation tests (such tests are run in a separate test application or "test APK" which is developed in the androidTest folder).
How can I make an Intent that will launch the test APK?
You can't run instrumentation tests in response to an external stimulus like this. Instrumentation tests are always driven through a JUnit test harness, which requires yet some other controlling process to kick them off using the am instrument command line program on the device. This is typically Android Studio, which will install both your app APK and your test APK, then kick off the tests. Firebase Test Lab will also take both APKs kick off your tests on physical and virtual devices.

How do I build only one class of Espresso Instrument APK file?

I had read these documents from AWS, learning how to use Espresso testing on AWS.
Then, I made 3 different classes for different tests.
In this step, I selected only one ‘class’ in the Configuration setting,
and run it by right click, only this LaunchActivityTest class runs on my device.
But while I upload the app-alpha-debug-androidTest.apk to AWS Device Farm,
I found that all of my 3 testing class are build in this APK.
How do I build only one class of Espresso Instrument APK file?

Categories

Resources