|
我的录制步骤如下:
1)在LR中选择SMTP协议;
2)在foxmail下录制smtp协议;
3)录制完的脚本如下:
Action()
{
smtp1 = 0;
smtp_logon_ex(&smtp1, "SmtpLogon",
"URL=smtp://192.168.6.25",
"CommonName=LoadRunner User",
LAST);
smtp_free_ex(&smtp1);
smtp2 = 0;
smtp_logon_ex(&smtp2, "SmtpLogon",
"URL=smtp://192.168.6.25",
"LogonUser=test1@22.com",
"LogonPass=111111",
"CommonName=LoadRunner User",
LAST);
smtp_send_mail_ex(&smtp2, "SendMail",
"To=test1@22.com",
"From=test1@22.com",
"Subject=my test",
"ContentType=text/plain;",
"charset=\"gb2312\"",
MAILOPTIONS,
"X-mailer: Foxmail 5.0 [cn]",
MAILDATA,
param12_1,
LAST);
smtp_logout_ex(&smtp2);
smtp_free_ex(&smtp2);
return 0;
}
4)运行以上脚本时,提示的错误信息如下:
Virtual User Script started
Starting action vuser_init.
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(5): Debug message:Smtp Logon to 192.168.6.25
Action.c(5): Debug message:Smtp Logon successful.
Action.c(10): Debug message:Smtp session freed.
Action.c(13): Debug message:Smtp Logon to 192.168.6.25
Action.c(13): Error -86404:Authentication failed for test1@22.com:111111
Action.c(13): Error -86406:Logon Session failed! (See below for details)
535 User is not local
Abort was called from an action.
Ending Vuser...Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
该邮件系统需要SMTP认证,我在foxmail中,勾选了“smtp服务器需要身份认证”后,也还是出现同样的错误,请高手指示以上错在哪了,谢谢。 |
|