tool-suite-X icon indicating copy to clipboard operation
tool-suite-X copied to clipboard

Create new Espresso Tests for Survey's revised tool bar

Open wbrunette opened this issue 11 months ago • 16 comments

NOTE: We will allow 3 people to work on this issue

Remember to use "update-jdk11" branch to access revised top bar.

Develop a new set of tests to check for bugs using Android Espresso tests

https://developer.android.com/training/testing/espresso

wbrunette avatar Mar 25 '24 21:03 wbrunette

Hi @wbrunette can I work on this?

Chinex-Boroja avatar Mar 25 '24 22:03 Chinex-Boroja

@wbrunette @Redeem-Grimm-Satoshi can i work on this?

siva224513 avatar Mar 26 '24 07:03 siva224513

@wbrunette @Redeem-Grimm-Satoshi I would like to work on this as well, if my pending PRs on the free for all task would allow. if someone else who hasn't made much contributions indicates interest, they should be prioritized over myself.

I also have a question i need clarification on. pls correct me if i am wrong, the way i understand how this app works with services, the sync and settings in the toolbar sends an intent to launch the requested activity on the service app, and these settings and sync feature have been tested on the service app. they are part of the broken UI tests for which i have pending PRs, if this is actually the case, what exactly are we expected to test on the survey app toolbar, since the features it links to has already been tested?

Stryker101 avatar Mar 26 '24 08:03 Stryker101

@siva224513 and @Stryker101 you have been assigned to the issue

wbrunette avatar Mar 26 '24 14:03 wbrunette

@wbrunette I made a PR for this issue but the CI/CD test are failing. I'm guessing its because the workflow does not include installing the Services App on the virtual device. The newly created tests do need Services installed on the testing device to run

how do i go about this?

Stryker101 avatar Mar 31 '24 11:03 Stryker101

the build system is still being worked on... the issue is Services keep failing tests, so the pipeline does not post the APK for Survey to use. This is not an issue you need to worry about for your contribution period. I plan to download your code and try it out myself in the next 48 hours.

wbrunette avatar Mar 31 '24 13:03 wbrunette

the build system is still being worked on... the issue is Services keep failing tests, so the pipeline does not post the APK for Survey to use. This is not an issue you need to worry about for your contribution period. I plan to download your code and try it out myself in the next 48 hours.

@wbrunette It's this PR that made me realise there was a workflow in place already, as i never encountered it during my PRs for Services, of which u just explain why. I'm curious about the design for this workflow. Sounds interesting to me. I've learnt so much during this contribution phase😀😀. Is there documentation for this workflow that i can read?

Stryker101 avatar Mar 31 '24 15:03 Stryker101

Hi @wbrunette I am currently getting an error while a couple of tests: java.lang.IllegalStateException: Unable to open properties lock file. Failed on Pixel_7_pro_API_29. Initially, two of my tests were running fine and passing, but all of a sudden I started getting the error on Android Studio while trying to rerun the tests and push a PR. I can't really point out where this is coming from. I have restarted my Android studio severally and invalidated the caches, but still it persists. Any idea why this is happening?

Chinex-Boroja avatar Apr 01 '24 18:04 Chinex-Boroja

the build system is still being worked on... the issue is Services keep failing tests, so the pipeline does not post the APK for Survey to use. This is not an issue you need to worry about for your contribution period. I plan to download your code and try it out myself in the next 48 hours.

@wbrunette It's this PR that made me realise there was a workflow in place already, as i never encountered it during my PRs for Services, of which u just explain why. I'm curious about the design for this workflow. Sounds interesting to me. I've learnt so much during this contribution phase😀😀. Is there documentation for this workflow that i can read?

You can check out: https://en.wikipedia.org/wiki/Continuous_integration

There are lots of articles out there, but at least that will get you started on terms.

wbrunette avatar Apr 01 '24 18:04 wbrunette

Hi @wbrunette I am currently getting an error while a couple of tests: java.lang.IllegalStateException: Unable to open properties lock file. Failed on Pixel_7_pro_API_29. Initially, two of my tests were running fine and passing, but all of a sudden I started getting the error on Android Studio while trying to rerun the tests and push a PR. I can't really point out where this is coming from. I have restarted my Android studio severally and invalidated the caches, but still it persists. Any idea why this is happening?

Do you have Services installed on your emulator as Survey requires Services?

wbrunette avatar Apr 01 '24 18:04 wbrunette

Hi @wbrunette I am currently getting an error while a couple of tests: java.lang.IllegalStateException: Unable to open properties lock file. Failed on Pixel_7_pro_API_29. Initially, two of my tests were running fine and passing, but all of a sudden I started getting the error on Android Studio while trying to rerun the tests and push a PR. I can't really point out where this is coming from. I have restarted my Android studio severally and invalidated the caches, but still it persists. Any idea why this is happening?

Do you have Services installed on your emulator as Survey requires Services?

Yes I do, and Services was running when the initial tests passed

Chinex-Boroja avatar Apr 01 '24 19:04 Chinex-Boroja

You can try wiping the Emulator and trying again.

wbrunette avatar Apr 01 '24 19:04 wbrunette

You can try wiping the Emulator and trying again.

@Chinex-Boroja i think that issue has to do with permissions. Survey need some permissions to run. Did u set up those in ur tests?318258457-af96477a-defe-45f7-9f15-50a6918e0f2a.png

Try adding that grant permissions block to ur test and see if it runs. Let me know how it goes.

Stryker101 avatar Apr 01 '24 22:04 Stryker101

yes I did @Stryker101, but still getting the same error

Chinex-Boroja avatar Apr 02 '24 01:04 Chinex-Boroja

yes I did @Stryker101, but still getting the same error

I can take a look at it for you if u want.

Stryker101 avatar Apr 02 '24 04:04 Stryker101

I have resolved the issue @Stryker101 @wbrunette. I have downloaded another emulator (Pixel 8 Pro API 29)

@wbrunette I Just raised a PR, but it seems the build is failing, I can see from the previous conversation, that it's due to Services failing the tests

Chinex-Boroja avatar Apr 02 '24 10:04 Chinex-Boroja