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

标签 testing performance-testing loadrunner

我已经复制了 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/

相关文章:

google-chrome - 在Chrome DevTools中测量整页大小

java - 如何使用java进行Web服务负载测试?

testing - HPE LoadRunner 中的不可逆加密密码

java - 在loadrunner 9.52中使用java over WEB(http/html)协议(protocol)

java - 在运行时测量 Java 中一段代码的内存使用情况作为服务的持续功能

java - 我应该用什么文件名来测试我的应用程序?

c# - WCF 测试客户端中的 Async() 方法

angularjs - $httpBackend 测试 $resource 服务的问题

java - 即使我已经将 RAM 从 8G 升级到 16G,我仍然收到 JMeter 内存不足错误

string - 测试 JSTL 字符串值?