Parameters 如何在Loadrunner Trueclient中参数化URL的一部分?

Parameters 如何在Loadrunner Trueclient中参数化URL的一部分?,parameters,performance-testing,loadrunner,Parameters,Performance Testing,Loadrunner,我如何参数化URL的一部分,如下所示 URL:example.com/data/api/…../xyz 待参数化:api 我尝试使用TC.getParam(“api”),但返回时出错 Error: Navigate to [Exception] ** failed - an argument is invalid: 'Location': JavaScript exception 'SyntaxError: Expected ';'' during evaluation 还尝试了Ar

我如何参数化URL的一部分,如下所示

URL:example.com/data/api/…../xyz
待参数化:api

我尝试使用TC.getParam(“api”),但返回时出错

    Error: Navigate to [Exception] ** failed - an argument is invalid:
 'Location': JavaScript exception 'SyntaxError: Expected ';'' during evaluation
还尝试了ArgsContext.TC。getParam(“api”)也返回了相同的错误:
有人能帮忙吗


我不想参数化整个URL,因为它太大了。

我试过这样的方法 “+LR.getParam(“url”)并且它对我有效。所以你可以尝试类似的方法

"example.com/data/"+LR.getParam("url")+"/....../xyz"

url是一个必须在LR参数文件中单独定义的参数。请告诉我这是否有帮助。请记住,您在参数选项中选择了Javascript而不是参数。我为您附上了一个示例。

享受测试:)