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
59 stars 7 forks source link

[Revese Port Forwarding] Sometimes, the execution of reverse port forwarding method is too slow #1248

Open gomboskriszta15 opened 1 year ago

gomboskriszta15 commented 1 year ago

Steps to reproduce

  1. Create a test file in any programming language (C#, Python or Java)
  2. Call the Reverse Port Forwarding method in the setup
  3. Add some tests
  4. Run the tests

Actual result

Sometimes, the execution of the Reverse Port Forwarding method is too slow so the tests fail because the port is not actually forwarded when trying to establish the connection

Note: Related [ReverPortForwarding-Docs] Sometimes, the execution of reverse port forwarding method is too slow so the tests fail because the port is not actually forwarded when trying to establish the connection

Expected result

The Reverse port forwarding method should finish its execution before the test is run.

gomboskriszta15 commented 1 year ago

I cannot reproduce this bug with TrashCat build made with SDK 2.0.0 released. Closing the ticket.

MihaiCuc98 commented 1 year ago

@sandraaltom I modified the title and the description of this ticket and I will move it to ToDo.

MihaiCuc98 commented 1 year ago

I was unable to reproduce this issue in C# (10 attempts), but in Python, I was able to reproduce it (2 times in 8 attempts). Maybe this bug can be caused by the speed of the programming language.

AltomSebiPacurar commented 1 year ago

I am unable to reproduce the bug in any of the 3 languages. I ran the same test for more than 50 times each, under different circumstances, such as enforcing the bug to occur by removing the wait() method for the subprocess operation to finish, in python test. One interesting issue I have encountered, is that I need the .NET7.0, instead of .NET5.0 to be able to run C# tests from the command line, although all tests have passed in C# as well.

sandraaltom commented 1 year ago

After talking with the team in the status meeting, we concluded that we won't fix this for 2.0.2, but later.

One proposal to fix the problem (since @MihaiCuc98 was able to reproduce the bug on Python) is to make sure that we wait for the subprocess operation to finish in all languages.

sandraaltom commented 11 months ago

Triaged Week no. 38, 2023.