Loadrunner C代码动态函数调用
我正在针对第三方库(在 HP/Mercury Loadrunner 中)使用 C 进行编程。我正在尝试计算动态调用另一个函数所需的代码。请参阅下面的示例。有人可以协助编写使这项工作有效的代码吗?
HomePage() {
// Load Runner code to conduct home page call
}
SearchResults() {
// Load Runner code to conduct some search results call
}
**FunctionCall(char function[]) {
// Conduct a remote call to another function based on what was passed in???
function;
}**
Main() {
FunctionCall(HomePage);
FunctionCall(SearchResults);
}
I am programming in C against a third party library (in HP/Mercury Loadrunner). I am trying to work out the code needed to dynamically call another function. See example below. Can someone assist with the code that will make this work?
HomePage() {
// Load Runner code to conduct home page call
}
SearchResults() {
// Load Runner code to conduct some search results call
}
**FunctionCall(char function[]) {
// Conduct a remote call to another function based on what was passed in???
function;
}**
Main() {
FunctionCall(HomePage);
FunctionCall(SearchResults);
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您正在寻找函数指针:
if you are looking for pointer to functions:
好的,只是为了澄清......您是否尝试(a)在 LoadRunner 内部使用之外使用 LoadRunner 函数和组件,或者(b)设计将在 LoadRunner 内部使用的代码,该代码使用您的附加代码?
一条道路会带来成功,而另一条道路则不然。
OK, just for clarification..... Are you trying to (a) Use LoadRunner functions and components outside of use within LoadRunner or (b) Designing code which will be used inside of LoadRunner which uses your additional code?
One path will result in a success, the other not so.
该代码正在 loadrunner 代码中使用,并且现在基于示例运行。
你的意见是什么?
This code is being used within loadrunner code and is working now based on the example.
What is your input?