alttester / alttester/AltTester-Unity-SDK

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

Abierto
#1,166 3 comentarios 0 reacciones 0 asignados Ver en GitHub
bug investigate no version triaged
Lenguaje dominante
C#
Estrellas
121
Forks
24
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.