003, UI Automation Test: When using Selenium or Appium running automation, it is often unstable (this test passes, next time after the next time, which you can think of to solve these problems?


The interview questions are as follows:


Reference answer:

This question is distinguished from Selenium and AppIUM, because Selenium and Appium unstable factors are different, but it is much different.

1, Selenium, generally increaseImplicit waitingandShow waitingForce waiting,Failure Run,JS Operation AttributeTo ensure positioning;

2, appium, if he will have an environmental problem, such as the unstable generation of real machine connection, so you can execute it with a multi-actual machine, you can choose other real machines after failure, if there is not so much mobile phone, environmental problem Then there is only your own code.

Going to try to solve it, AppiUM is similar to the rest of the JS operation attribute.

Display Waiting is essential, implicit waiting is necessary; but is not to solve all positioning problems.


When multi-threaded, the test case is influential. Although the running speed is faster when multi-thread, if the coupling between the use cases is not designed, it will affect if the use case A is executed with example B,

Affect the use case b; there is no problem. In this case, it is necessary to reduce the test case coupling degree, and there is no relationship as much as possible because the execution order of the multi-thread is not controlled.

Multithreading execution Selenium If it is an Allure integration report, the test report is abnormal.