[英]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.