Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,048
Community Members
 
Community Events
184
Community Groups

Android espresso test script

Edited

I am working on an Android project and also implementing CI/CD for the same. I have JUnit and Android Espresso with unitTest and androidTest packages.

I am able to perform unitTest through Bigbucket CI/CD with an example script but how i should perform it? Please suggest.

Using this script step 4 is getting failed

image: androidsdk/android-30
pipelines:
default:
- parallel:
- step:
name: Android Debug Application
caches:
- gradle
script:
- ./gradlew assembleDebug
artifacts:
- app/build/outputs/**
- step:
name: Lint
caches:
- gradle
script:
- ./gradlew lint
artifacts:
- app/build/reports/**
- step:
name: Unit Test
caches:
- gradle
script:
- ./gradlew :app:testProductionDebugUnitTest
artifacts:
- app/build/reports/**
- step:
name: UI Test
caches:
- gradle
script:
- ./gradlew :app:connectedProductionDebugAndroidTest
artifacts:
- app/build/reports/**

 

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 08, 2022

Hello @Niral Bhavsar ,

Thank you for reaching out to Atlassian Community!

Could you please share with us the logs from the step that is failing? 

Also, if you try running the same build locally in your machine, does the same error happens? If you are not sure how to run it locally in a docker container, please refer to the instructions in the following documentation : 

Kind regards,

Patrik S

Here is my Log file it says 

> com.android.builder.testing.api.DeviceException: No connected devices!

 

It is failed for Step 5  - UI Test

Pileline Logs 

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 13, 2022 • edited

Hello @Niral Bhavsar ,

The error you reported was most likely because there was no device started in the android emulator to run your UI tests.

The android emulator needs Hardware acceleration to properly work, and unfortunately, at this moment pipeline environment does not support Hardware acceleration. We already have a feature request to implement this functionality, which you can find in the link below: 

I would suggest you to add your vote there, since this helps both developers and product managers to understand the interest. Also, make sure you add yourself as a watcher in case you want to receive first-hand updates from that ticket. Please note that all features are implemented with this policy in mind.

Thank you, @Niral Bhavsar .

Kind regards,

Patrik 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events