gpt4 book ai didi

testing - 我无法在 HP Virtual User Generator 脚本上重命名我的事务

转载 作者:行者123 更新时间:2023-11-28 21:28:54 25 4
gpt4 key购买 nike

我已经复制了 Vu 的脚本(当然还重命名了它),它可以访问另一个数据库,当我运行它时,我在输出中有旧脚本的旧事务名称。

这是在输出中看到的旧交易名称:MDM_GetAssociations这是重命名的交易:MDM_GET_ASSOCIATIONS_Otmann

重命名事务后,我运行脚本,出现 2 个错误:1)错误 14 未声明的标识符 `MDM_GET_ASSOCIATIONS_Otmann' Action.c C:\GCDM_Test\Scripts\MDM\MDM_Get_POSTGRE_Otmann MDM_Get_POSTGRE_Otmann

2)错误 15 web_custom_request' 的参数 1 类型错误;发现 int' 预期为“指向常量字符的指针” Action.c C:\GCDM_Test\Scripts\MDM\MDM_Get_POSTGRE_Otmann MDM_Get_POSTGRE_Otmann

这是我的脚本:

//########## start the test scenario ############
web_set_max_html_param_len("8000");
web_set_sockets_option("SSL_VERSION", "TLS");
web_add_auto_header("Content-Type","application/xml");
web_add_auto_header("Accept","application/json");
web_add_auto_header("Authorization",lr_eval_string("{AUTHORIZATION}"));

//GetAssociations, NOTE: our dummy customers have often NO associations!
web_reg_save_param("RESPONSE", "LB=", "RB=", "Search=Body", LAST);
lr_start_transaction((char*)MDM_GENERIC_TRANSACTION);
lr_start_transaction((char*)MDM_GET_ASSOCIATIONS);
web_custom_request(MDM_GET_ASSOCIATIONS,
"URL={TEST_ENV_HOSTNAME}/api/v3/clients/{BUSINESS_CONTEXT}/customers/{GCID}/associations",
"Method=GET",
"Resource=1", // => We are retrieving a ressource,
// which implies that it is not critical for the success of the script.
// Any failures (HTTP 404 - Not found etc.) in downloading the resource
// will be considered as warnings rather than errors.
"EncType=application/xml",
"Referer=Loadrunner",
LAST);
lr_end_transaction((char*)MDM_GET_ASSOCIATIONS, LR_AUTO);
lr_end_transaction((char*)MDM_GENERIC_TRANSACTION, LR_AUTO);

return 0;

这是显示旧事务名称 (MDM_GetAssociations) 的输出,但我不知道她在哪里编码或从哪里来,正如我之前所说,当我尝试在所有位置更改它时与交易有关,我遇到了上述错误。

这是脚本的输出,您可以在其中看到旧事务的名称 (MDM_GetAssociations)。

    Action.c(13): Notify: Transaction "MDM_GenericServiceCall_ALL" started.
Action.c(14): Notify: Transaction "MDM_GetAssociations" started.
Action.c(15): web_custom_request("MDM_GetAssociations") started
Action.c(15): web_custom_request("MDM_GetAssociations") highest severity level was "warning", 505 body bytes, 1971 header bytes [MsgId: MMSG-26388]
Action.c(25): Notify: Transaction "MDM_GetAssociations" ended with "Pass" status (Duration: 1,8408 Wasted Time: 1,2668).
Action.c(26): Notify: Transaction "MDM_GenericServiceCall_ALL" ended with "Pass" status (Duration: 2,4066 Wasted Time: 1,2668).
Ending action Action.
Ending iteration 1.

最佳答案

你有两个变量。你在这里没有他们的声明。你没有他们的内容。而且您似乎将它们从另一种数据类型转换为指向字符的指针。

这是否通过文字“My_Test_Transaction”?如果是这样,那么您可能会发现有关变量声明、填充和引用方式的奇怪之处。

关于testing - 我无法在 HP Virtual User Generator 脚本上重命名我的事务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30528349/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com