After developing the client that provided the added log version, start trying to reproduce the error. Manually logged in more than 20, again encountered login failed, but development said the output log is not detailed enough to resubmit a compiled version. Really do not want to repeat the login operation, so think of writing an automated script to achieve the manual process:
1 Enter user name, password, login client
2) Exit the client
3 Delete the installed User application directory (after each user login, will generate a user's application directory, delete is to try to close to the new installation of the client and then log in)
The first thought is QTP, but because my test machine before the installation QTP not successful, reload system of course is too late. So the idea of using AutoIt to complete the above requirements, the code is simple, as follows:
Run ("D:\ installation directory \xxx.exe")
; Sleeping sleep (milliseconds), this is to wait for the user to log in to the dialog box appears
Sleep (2000)
; dialog box waiting for client to log on
Winwait ("Login box window name")
; Enter a user ID in the user box by: controlsend (Window caption, window text, control ID, string [, Flag])
Controlsend ("Login box window name", "" "," Edit6 "," username ")
; Enter a password in the Password box
Controlsend ("Login box window name", "" "," Edit7 "," passwd ")
; Click on the "Login" button, Method: Controlclick ("window title", "Window text", control ID [, button [, click Times [, x coordinates [,; Y-coordinate]]]
Controlclick ("Login box window name", "", "Button6")
; Wait 5 seconds
Sleep (5000)
, waiting for the client window to appear when the login is successful
Winwait ("client window name after successful login")
Sleep (5000)
Winclose ("client window name after successful login")
To delete user application stencil paths generated after logon
DirRemove ("C:\ User application Directory", 1)
With this script, we can reproduce or verify that the defect is fixed by specifying the number of logins. Finally, the 11th modified version of the development, the repeated run login 50 times, no login failed, indicating that the defect was repaired. If the use of manual testing, 11 versions of the test down hand estimate will be broken, hehe.
AutoIt provides a window information tool to identify a window or control, which is simple enough to refer to the Help manual for AutoIt.