AltTester-Unity-SDK
AltTester-Unity-SDK copied to clipboard
Issue with `PressKey` command exposed by `TestPressKeyWaitTheDuration` ran multiple times
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.<RunTests>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
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