51Testing软件测试论坛

标题: LoadRunner里面把数据写入文件 [打印本页]

作者: lhjtc8257    时间: 2007-8-1 14:17
标题: LoadRunner里面把数据写入文件
#include "web_api.h"


Action()
{
        
        long file;

        char * time;

        char * total;

        char * member;        
                     
                     /*。。。。*/

        web_reg_save_param("p_time",
        "LB=现在时间是",
        "RB=</td>",
        LAST);


        web_reg_save_param("p_total",
                "LB=&nbsp;<span class=\"bold\">",
                "RB=</span> 条记录",
                LAST);


        web_reg_save_param("p_memeber",
                "LB=条记录 - <span class=\"bold\">",
                "RB=</span> 成员信息",
                LAST);

        /*。。。*/

        file=fopen("E:\\tongji.txt","at+");

        time=lr_eval_string("{p_time}\t\t");

        total=lr_eval_string("{p_total}\t\t");

        member=lr_eval_string("{p_memeber}\t\t");

        fputs(time,file);

        fputs(total,file);

        fputs(member,file);

        return 0;
}




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