The LoadRunner Blog

Tuesday, March 20, 2007

My Load Test » Blog Archive » LoadRunner CPC Exam

My Load Test » Blog Archive » LoadRunner CPC Exam

Stuart Moncrieff's page on the LoadRunner CPC Exam is a must read. While you are at it, you should also download the LR80Sp-StudySummary-03.pdf and the LR81CPC-StudySummary-01B.pdf files to know more about the CPS and CPC certifications. FWIW, the CPS appears to be rather basic. Will let you know when I do it.

Saturday, March 10, 2007

Replace x Character in your parameter with 'y'

A code snippet from ptrussell on sqaforums here

http://www.sqaforums.com/showthreaded.php?Cat=0&Number=362879&page=0&vc=1

Tells you how to replace some character in your parameter with another - in this case, replace a "+" with a " "

{
char *tmpstr;
int i;

tmpstr = lr_eval_string("{Map_Page_Street_Correlation}");

for (i = 0; tmpstr[i]; i++)
if (tmpstr[i] == '+') tmpstr[i] = ' ';
lr_save_string(tmpstr, "New_Street");
}
Jacqui posted another solution below

I thought I would throw this solution out there for general info. LR has a built in function to handle this. Here is an example....

web_convert_param("ParamName", "SourceString={Map_Page_Street_Correlation}","SourceEncoding=URL", "TargetEncoding=PLAIN", LAST);


Have a great weekend!
Jacqui

Labels: , , ,