Vue.js e2e tests how nightwatch is entered manually

login form with username, password and CAPTCHA. Username and password are handled using browser.setValue . What about CAPTCHA?
how to pause the test process and receive user input in the corresponding test case? Get the input value and continue to execute?


answer yourself:
when you encounter CAPTCHA in automated testing, the general solutions are: turn off CAPTCHA, universal CAPTCHA, crack CAPTCHA, console Synchronize input, and so on. If CAPTCHA is turned off, it is not considered to simulate a complete development environment. If it is a universal CAPTCHA, the backend will complain about insecurity. Brute force cracking looks like a positive solution, but it can be cracked violently, and the back end is probably going to crash! Console Synchronize input colleagues have a demonstration (Pythone version), Node version did not think of how to achieve (dish)! So, how to enter CAPTCHA in automation bothered me all afternoon.

later, I noticed the method of .pause () ( official document ), and suddenly thought, why not set a long enough time for us to manually enter the CAPTCHA, and then it will continue to complete the submission when the timing is over?! Sure enough, this method is feasible! But the disadvantage is that there is no automated testing, manual intervention.

 

recently, I am writing an exercise of encapsulating Baidu login module with js, and I am also wrestling with this

.

the local test is fine. Send it to ravisci for testing, requiring both CAPTCHA and SMS verification

.

attempted to simulate http data because many of the requested initialization parameters are random and unsuccessful

later, Google searched and read some articles to deepen the understanding of the test

before, the whole program was tested as a whole, and there was a lot of random data in the middle, which would make the test uncontrollable

.

for the time being, I want to test the module or even the method separately, and then replace the parameters that need to be referenced, or the module with simulation data and simulation functions, to make the input controllable, so that the results can be tested

.
Menu