Assigned
Status Update
Comments
na...@gmail.com <na...@gmail.com> #2
Do you have a repro project that you could share with us?
There should be no need to excluding any dependencies: we automatically remove them from the test APK if they are in the main APK.
There should be no need to excluding any dependencies: we automatically remove them from the test APK if they are in the main APK.
ku...@google.com <ku...@google.com>
ku...@google.com <ku...@google.com> #3
Please provide following information which will help us to investigate this further,
* What is the desired behavior of the feature? (Be specific!)
* If relevant, why are current approaches or workarounds insufficient?
* If relevant, what new use cases will this feature will enable?
* What is the desired behavior of the feature? (Be specific!)
* If relevant, why are current approaches or workarounds insufficient?
* If relevant, what new use cases will this feature will enable?
na...@gmail.com <na...@gmail.com> #4
* What is the desired behavior of the feature? (Be specific!)
- As I said above, currently we can't test the application while video is streaming in app, because of Espresso wait for the Main thread idle. And Main thread consistently work with UI when video is streaming. This causes Espresso fail to perform any action on UI.
- Espresso is wait for Main thread to idle when `loopMainThreadUntilIdle()` method called on `UIController` from `ViewAction` or `ViewMatcher`. This method called for each and every Espresso action. This is synchronization in Espresso.
- However there may be situations where the interactions must be performed in spite of app being busy. For example Video streaming app where video is continuously streaming still we need to perform an action. Or messaging app, a photo might be uploading and corresponding animation running but the test might still want to type and send a text message.
- So we can handle this scenario using below tasks:
A. Programmer can decide whether Espresso will wait for Main thread to idle in a particular test case. Using setter/getter method or any other way. (THIS IS REQUIRED)
B. Also add option to disabling synchronization for specific URL or Asynch task. i.e. Espresso does not wait for only video streaming URL or video streaming Asynch tasks.
C. When Programmer disable the synchronization Espresso test cases are going to fail, because it will not wait for next screen(UI) when user perform any action on UI. So add timeout while finding view in this case. So if Programmer wants to find 'SettingsButton' on UI and synchronization has disabled then espresso will wait for few milliseconds (i.e. timeout. There should be default timeout and Programmer can specify the timeout) to find this element.
* If relevant, why are current approaches or workarounds insufficient?
- The current approaches does not work in this case, because when Video is streaming and Espresso try to perform any action on it, then it will wait for app to be idle and as video is streaming app never goes to idle state. This cause Espresso throws `TimeOutException` and entire test case fail.
- As per my findings currently there is no way to handle this. Also I could not found any workaround to this handle this case.
* If relevant, what new use cases will this feature will enable?
- Using this feature we can add test cases for similar to below app:
a. Video streaming app (Add test cases when video is streaming)
b. Messaging app (While uploading photo the corresponding animation running but the test might still want to type a message and send it)
c. There are lot of app where animations are continuously running still we need to perform action and test the application.
- As I said above, currently we can't test the application while video is streaming in app, because of Espresso wait for the Main thread idle. And Main thread consistently work with UI when video is streaming. This causes Espresso fail to perform any action on UI.
- Espresso is wait for Main thread to idle when `loopMainThreadUntilIdle()` method called on `UIController` from `ViewAction` or `ViewMatcher`. This method called for each and every Espresso action. This is synchronization in Espresso.
- However there may be situations where the interactions must be performed in spite of app being busy. For example Video streaming app where video is continuously streaming still we need to perform an action. Or messaging app, a photo might be uploading and corresponding animation running but the test might still want to type and send a text message.
- So we can handle this scenario using below tasks:
A. Programmer can decide whether Espresso will wait for Main thread to idle in a particular test case. Using setter/getter method or any other way. (THIS IS REQUIRED)
B. Also add option to disabling synchronization for specific URL or Asynch task. i.e. Espresso does not wait for only video streaming URL or video streaming Asynch tasks.
C. When Programmer disable the synchronization Espresso test cases are going to fail, because it will not wait for next screen(UI) when user perform any action on UI. So add timeout while finding view in this case. So if Programmer wants to find 'SettingsButton' on UI and synchronization has disabled then espresso will wait for few milliseconds (i.e. timeout. There should be default timeout and Programmer can specify the timeout) to find this element.
* If relevant, why are current approaches or workarounds insufficient?
- The current approaches does not work in this case, because when Video is streaming and Espresso try to perform any action on it, then it will wait for app to be idle and as video is streaming app never goes to idle state. This cause Espresso throws `TimeOutException` and entire test case fail.
- As per my findings currently there is no way to handle this. Also I could not found any workaround to this handle this case.
* If relevant, what new use cases will this feature will enable?
- Using this feature we can add test cases for similar to below app:
a. Video streaming app (Add test cases when video is streaming)
b. Messaging app (While uploading photo the corresponding animation running but the test might still want to type a message and send it)
c. There are lot of app where animations are continuously running still we need to perform action and test the application.
na...@gmail.com <na...@gmail.com> #5
ku...@google.com <ku...@google.com> #7
Thank you for reporting this issue. We have shared this with our product and engineering team and will update this issue with more information as it becomes available.
am...@google.com <am...@google.com>
vi...@google.com <vi...@google.com> #8
The issue has been fixed and it will become available in a future Android release.
vi...@google.com <vi...@google.com> #9
Apologies, please ignore above comment, its not relevant to this bug.
cc...@google.com <cc...@google.com>
cc...@google.com <cc...@google.com>
ae...@google.com <ae...@google.com> #10
This has not been updated in over 1 year so is being closed. Please reopen as neccesary.
jk...@gmail.com <jk...@gmail.com> #11
Don't know what is being closed
Description
Feature Request:
Can we add support to enable/disable synchronisation, so user can do this when it is required. Otherwise synchronisation is enabled by default and user can disable it for particular test case.
QUESTION: Is there any support added to test the video streaming app?