LoadRunner中的随机数 Action() { int i; char OrderId[21]; srand(time(NULL)); i=rand()%10; lr_save_datetime("%m%d%H%M%S", DATE_NOW, "now"); sprintf(OrderId, "%s%d", lr_eval_string("{now}"),i); lr_output_message("定单号为:%s", OrderId); return 0; }
时间: 2024-10-30 23:41:31