alttester / alttester/AltTester-Unity-SDK

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

Aperta
#1,166 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug investigate no version triaged
Lingua principale
C#
Stelle
121
Fork
24
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## 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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.