如何将param值赋给loadrunner中的字符串变量

时间:2016-09-21 17:24:37

标签: string loadrunner

我们可以将param值赋给字符串变量吗? 例如: func adaptivePresentViewController(viewController: UIViewController) { let detailVC = splitViewController!.viewControllers[1] detailVC.definesPresentationContext = true viewController.modalPresentationStyle = .CurrentContext detailVC.presentViewController(viewController, animated: true, completion: nil) }

我们如何将web_reg_save_param_ex("paramname=p","LB={something}", "RB={something}", LAST);值存储在字符串变量中。

2 个答案:

答案 0 :(得分:1)

您可以使用效用函数(lr_save_string()和lr_eval_string())。

web_reg_save_param_ex(" paramname = p"," LB = {something}"," RB = {something}",LAST);

lr_save_string(lr_eval_string(" {P}"),"所以LocalVariable&#34);

答案 1 :(得分:0)

  • strcpy()
  • strncpy()
  • sprintf()......