microsoft / WinAppDriver

Windows Application Driver
MIT License
3.7k stars 1.4k forks source link

Is WinAppDriver suitable for long running tests? Crashed after some time with an exception code 0x4000001f #1443

Open spacer-rado opened 3 years ago

spacer-rado commented 3 years ago

Hi folks,

can I get an answer on a question whether WinAppDriver is also suitable for long running tests? We have a long running test suite which we want to be running for at least 7 days.

Now, when we executed the test, it crashes after already couple of hours (sometimes less, sometimes more) because there is no connection to the remote (or local) winappdriver instance. When we checked the machine, WinAppDriver was not running anymore.

Our long runner is basically an infinit loop where we start the application on a local and a remote machine (both machines have their winapp driver running). E.g. first 80 test runs (loops) are completely ok, and then suddently, during the next test run, winappdriver is stopped and therefore the test cannot connect and the test fails. It starts the application, clicks some elements and then, crash.

Event viewer contains error image

I checked different sites and also some threads here, but no success. Thanks for any hints/advice.

WinAppDriver version can be seen in the picture and the test is written in C# and the tested application is in C# WPF. Tests are running on Windows 10 and all is x64.

anunay1 commented 3 years ago

I start and stop Winappdriver.exe after every test.

krishna494 commented 3 years ago

I start and stop Winappdriver.exe after every test.

@anunay1 Can you please provide me the code. Below snippet is not working ending up with error

public static void start_Driver() throws Exception {

    String filelocation = System.getProperty("user.dir") + File.separator + "WinAppDriver" + File.separator
            + "WinAppDriver.exe";
    System.out.println("file ---->  " + filelocation);
    ProcessBuilder pBuilder = new ProcessBuilder(filelocation).inheritIO(); 
    // pBuilder.inheritIO(); p =
    pBuilder.start();

}