How to kill the app and start each test fresh?

16 views
Skip to first unread message

Natalia Ly

unread,
Aug 26, 2021, 11:37:23 AM8/26/21
to AltUnity - UI test automation tool for Unity3D
Hello, as I run my tests, app is not killed and just continue with other tests.
Please advise on how to kill the app for each test. In TearDown method this line    altUnityDriver.Stop(); just stops the test. Thank you!

public class MyFirstAltUnityTest
{
    public AltUnityDriver altUnityDriver;
    //Before any test it connects with the socket
    [OneTimeSetUp]
    public void SetUp()
    {
        altUnityDriver = new AltUnityDriver();
    }

    //At the end of the test closes the connection with the socket
    [OneTimeTearDown]
    public void TearDown()
    {
        altUnityDriver.Stop();
    }
    [Test]

Robert Poienar

unread,
Aug 27, 2021, 10:31:45 AM8/27/21
to AltUnity - UI test automation tool for Unity3D, natali...@gmail.com
HI, We don't have a method that will restart the application. Once you restart the application the connection is lost. Our asset doesn't operate outside of the game. If you want to restart the application you will need to write scripts to do that. It might be enough just to load the scene you want to test again, this way it will reset the scene but not the whole application.
Reply all
Reply to author
Forward
0 new messages