web_report_data_point()
指定数据点并将其添加到测试结果。
int web_report_data_point(const char *EventType,const char * EventName,const char * DataPointName,LAST);
参数说明:
List of Attributes:以下属性可用:
EventType:指定要报告的事件的类型。目前,唯一支持的事件是“错误”。使用格式“EventType = string”。
EventName:指定要报告的事件的名称。目前,唯一支持的事件是“StepTimeOut”。使用格式“EventName = string”。
DataPointName:用户定义的字符串,指定数据点名称。使用格式“DataPointName = string”。
LAST:指示属性列表结束的标记。
一般信息 :
web_report_data_point函数定义脚本中要包括在测试结果中的数据点。最常见的数据点是步长超时,指示上一步是否超时。
使用web_report_data_point创建的数据点显示在控制器的在线图中。
示例:web_report_data_point
在以下示例中,web_report_data_point在步骤下载超时的情况下创建数据点。
在运行时必须设置RuntimeSettings > Miscellaneous, select "Continue on error"运行示例。
web_save_header(RESPONSE,“responseheader”);
//设置为通过设置不合理的超时来使web_url失败。
web_set_timeout(“Step”,“1”);
web_url(“cookie.html”,
“URL = http://www.kellynch_hall.com/walter_elliot/no_cookie.html”,
“TargetFrame= _TOP”,
LAST);
web_report_data_point(“EventType =Error”,“EventName = StepTimeOut”,“DataPointName =timeout”,LAST);