alttester / alttester/AltTester-Unity-SDK

Issue with `PressKey` command exposed by `TestPressKeyWaitTheDuration` ran multiple times

Đang mở
#1,166 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug investigate no version triaged
Ngôn ngữ chính
C#
Star
121
Fork
24
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Steps to reproduce

Run the `TestPressKeyWaitTheDuration` from `Assets\AltTester\Examples\Test\Editor\Driver\Testforscene1TestSample.cs` multiple times (try a number > `10`) using the `[Repeat(x)]` attribute in the script

## Actual result

### AR

🚫 the test fails the assertion at some point with a value less than `1` and the error in the console is of type: `Expected: greater than or equal to 1.0f But was: 0.998347282f`
- also another error was present in the unity console after the one mentioned above:
```
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <75633565436c42f0a6426b33f0132ade>:0)
AltTesterEditor.AltTestRunner.setTestStatus (NUnit.Framework.Interfaces.ITestResult test) (at Assets/AltTester/Editor/AltTestRunner.cs:317)
AltTesterEditor.AltTestRunner+<>c__DisplayClass7_0.b__0 () (at Assets/AltTester/Editor/AltTestRunner.cs:54)
System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at <75633565436c42f0a6426b33f0132ade>:0)
System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <75633565436c42f0a6426b33f0132ade>:0)
```

### Additional info

Testing Environment
- OS for Unity: `Windows 11`, `MacOS Big Sur v 11.7.4`
- instrumented builds created in Unity version `2021.3.16f1 LTS`
- _Samplescenes_ game instrumented with AltTester Unity SDK from `development` branch in 06.03.2023
- game tested on devices with OS: `Android 11`, `iOS 12.5.6`, `Windows 11`,` MacOS Big Sur v 11.7.4`

Screenshot
- ![image](https://user-images.githubusercontent.com/62327834/223154116-47b740fb-8eb3-4f61-828a-d5b20ad45e40.png)

Other notes
- the issue was exposed when testing #1026

## Expected result

### ER

The value from assertion should never be less than `1` and the test should pass using the `PressKey` command

### Additional info

## Testability

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.