alttester / AltTester-Unity-SDK

AltTester Unity SDK is an open-source UI driven test automation tool that helps you find objects in your game and interacts with them using tests written in C#, Python, Robot or Java.
https://alttester.com/docs/sdk/latest/home.html
GNU General Public License v3.0
63 stars 8 forks source link

[Intermittent-Android] Sometimes, the instrumented game is stuck when the phone enter in stand by mode and it is turn on after some time #1285

Open MihaiCuc98 opened 1 year ago

MihaiCuc98 commented 1 year ago

Steps to reproduce

1. Open the instrumented game on Android and connect it to the AltServer 2. Wait until the phone screen is turned off and the **phone becomes locked** 3. Reopen the phone -> The game is still displayed ## Actual result Sometimes the instrumented game is stuck and it can only be used after the instrumented app is closed and reopened again. ### Additional info ❗ The behavior is not reproducible if the phone is closed manually. ❗ The behavior is not reproducible if the instrumented game is not connected to the server in the first step. ❗ In some situations the screen of the phone becomes black in the third step (same steps were followed). ❗ When using a game without SDK, the game is not displayed in the third step. ## Expected result The instrumented game should be usable even if the phone was on standby for some time. ### Additional info ## Testability
MihaiCuc98 commented 1 year ago

@sandraaltom I logged this issue but I will not put any release label.

sandraaltom commented 1 year ago

@MihaiCuc98 Please re-test this ticket with a game without SDK.

MihaiCuc98 commented 1 year ago

Testing setup:

What was tested:

✅ Checked if the behavior is not reproducible on a not instrumented game by following the steps:

  1. Open the game
  2. Wait until the phone screen is turned off
  3. Reopen the phone.

AR: Depending on the interval between the steps 2 and 3, the AR was: ✅ The phone is locked, and the game behaves normally when the phone is unlocked. ✅ The phone is not locked and the game behaves normally, with no interrupts or stuck.

Number of attempts:

~20

MihaiCuc98 commented 1 year ago

Regarding the inconsistency of the locking screen, I made 2 videos to show this:

  1. Game without SDK -> The screen is locked and the game is not displayed when the phone is reopened in the third step: https://drive.google.com/file/d/1gBl59kF61bo0o41j8Zj9vh3jZQRjCq4i/view?t=5s
  2. Game with SDK (also reproduced successfully) -> The game is still displayed when the phone is reopened. At the end of the video, you can see that the screen is locked because when I exit the game, I have to enter the password to reopen it. https://drive.google.com/file/d/1CGv237a618OLaKvIkiWMF0kmM4ZTS-nc/view

I wonder about the cause of this behavior. Should it be a setting from unity? CC @RobertPoienar