51Testing软件测试论坛

标题: LR录制smtp的问题,请求指教 [打印本页]

作者: quick26    时间: 2007-6-17 13:35
标题: LR录制smtp的问题,请求指教
我的录制步骤如下:
 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服务器需要身份认证”后,也还是出现同样的错误,请高手指示以上错在哪了,谢谢。
作者: quick26    时间: 2007-6-17 18:57
标题: 急....
急....,请高手执教
作者: quick26    时间: 2007-6-20 09:23
标题: 求救
求救
作者: qiguojie    时间: 2007-6-20 09:38
帮你顶下,我也去录个看看
作者: duola1119    时间: 2007-6-20 09:40
好象是你的用户名和密码不符
作者: qiguojie    时间: 2007-6-20 09:46
原帖由 quick26 于 2007-6-17 13:35 发表
Action.c(13): Error -86404:Authentication failed for test1@22.com:111111

也许是密码错误
作者: 263    时间: 2008-2-1 15:05
标题: loadrunner 8.1 测试smtp,但是没有流量出去,smtp server收不到数据?
RT?请帮忙呀?
作者: paraliu    时间: 2011-7-20 09:23
为什么没有人能解决呢!?
作者: huran016    时间: 2012-6-25 11:34
我也遇到了类似问题。。
作者: redforce    时间: 2012-7-13 15:29
我直接写的,可以正常发送并接收邮件
作者: redforce    时间: 2012-7-13 15:33
smtp_logon("Logon","URL=smtp://logonuser@mail.****.com","CommonName=regbot" ,"LogonUser=logonuser","LogonPass=pwd",LAST);
smtp_send_mail("Send",
                         "To=***@qq.com",
                 "From=***@qq.com",
                        "Subject=注册机失败",
                       "ContentType=text/plain;",
                       "charset=\"GB2312\"",
                         MAILOPTIONS,
                           MAILDATA,
                          "MessageText=注册失败,请检查!",
                       LAST);
smtp_logout();




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2