简体   繁体   English

Loadrunner - 如何参数化VuGen中的更改值以获取挑战问题以输入相应的答案

[英]Loadrunner - how to parameterize changing value in VuGen for challenge questions to enter respective answers

Loadrunner - how to parameterize changing value in VuGen? Loadrunner - 如何参数化VuGen中的变化值?

Example: Challenge questions change every time when you try to login and answers to be parameterized according to the question that is displayed. 示例:每次尝试登录时,挑战问题都会更改,并且根据显示的问题对答案进行参数化。

Challenge question answer logic is that the last word of the question is the answer to be parameterized. 挑战问题答案逻辑是问题的最后一个词是参数化的答案。

Example: What is your name? 示例:你叫什么名字? Here "name" is the answer for the challenge question. 这里的“名字”是挑战问题的答案。

My scenario is that 3 challenge questions will be populated and 3 answers to be entered, we don't know which question will be populated in what order or so... 我的场景是将填充3个挑战问题并输入3个答案,我们不知道将以什么顺序填充哪个问题...

Make all of your challenge questions and answers the same for your test users. 为测试用户提供所有挑战问题和答案。 Correlate for the question. 关联问题。 Check for a match to the question and then set the response for the form. 检查问题的匹配项,然后设置表单的响应。

"What is your name?" “你叫什么名字?” "Bob" “鲍勃”

"What was the name of your first pet?" “你的第一只宠物叫什么名字?” "Cat" “猫”

"What is the name of your elementary school" "My School" “你小学的名字是什么”“我的学校”

... ...

FYI got it solved by using array in web_reg_sav_param function here we go... I placed below function above the right place(refering the questions .inf position in the generation log) web_reg_save_param("CQ", "LB= ", "RB=?", "Ord=ALL", "Search=Body", LAST); FYI通过在web_reg_sav_param函数中使用数组来解决它我们去...我将函数置于正确的位置上方(参考生成日志中的问题.inf位置)web_reg_save_param(“CQ”,“LB =”,“RB = ?“,”Ord = ALL“,”Search = Body“,LAST); then replaced answers with {CQ_1},{CQ_2} and {CQ_3} since i had 3 answers(pasted 2 time each as CQ_ , as i had same answers twice) 然后用{CQ_1},{CQ_2}和{CQ_3}替换答案,因为我有3个答案(每次粘贴2次作为CQ_,因为我有两次相同的答案)

web_submit_form("answerChallengeQuestions.faces",
     "Snapshot=t74.inf",
    ITEMDATA,
    "Name=answerChallengeQuestions:answerPasswordBox1", "Value={CQ_1}", ENDITEM,
    "Name=answerChallengeQuestions:answerTxtBox1", "Value={CQ_1}", ENDITEM,
    "Name=answerChallengeQuestions:answerPasswordBox2", "Value={CQ_2}", ENDITEM,
    "Name=answerChallengeQuestions:answerTxtBox2", "Value={CQ_2}", ENDITEM,
    "Name=answerChallengeQuestions:answerPasswordBox3", "Value={CQ_3}", ENDITEM,
    "Name=answerChallengeQuestions:answerTxtBox3", "Value={CQ_3}", ENDITEM,

Hope this helps 希望这可以帮助

Thanks, Ramanan M 谢谢Ramanan M.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在这种情况下,如何构建通用函数并参数化强制转换? - In this scenario, how to frame a common function and parameterize casting? 如何在 Adf 管道复制活动中参数化源 - How to parameterize the source in Adf pipeline copy activity JMeter:如果变量在 POST 请求中,如何对其进行参数化? - JMeter: How to parameterize a variable if its in POST request? LoadRunner Correlation:从服务器respponse捕获动态数组值 - LoadRunner Correlation : capturing dynamic array value from server respponse 我们如何处理loadrunner中弹出窗口中生成的动态值? - How can we handle dynamic values generated in Pop Ups in loadrunner? 如何通过更改单元格值在jqxGrid(jqwidget)单元格中填充自定义颜色? - How to fill custom colors in jqxGrid (jqwidget) cells by changing the cell value? 用Javascript显示不断变化的php值? - Showing a changing php value with Javascript? 使用Javascript动态更改PHP值 - Changing a PHP value dynamically with Javascript 在 Ionic 3 中动态改变 CSS 值 - Dynamically changing CSS value in Ionic 3 如何将不同的参数传递给使用各自的 sqlalchemy orm 类更新不同表的 function? - How to pass different parameters to a function that updates different tables using their respective sqlalchemy orm classes?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM