Our team just switched over from QALoad to Silk Performer and it looks as though I'm going to be having lots of fun!
I'm trying to do something that was simple in QALoad which I'm having issues doing in Performer. I'm trying to do the following:
I'm filling in a form in IE. The form has a name field. I entered in my name, Scott.
Because I'm going to be running this over and over again, I want to have my name as Scott1, then Scott2.. etc.
In QALoad I would write code like this:
myCounter = 1 code "Scott" & myCounter
myCounter = myCounter +1
This doesn't work in Silk Performer, or I'm doing something wrong. I've tried converting the number from a int to a string by doing this:
MyCounterN : number;
MyCounterS : string;
but that command is not liked. I saw something in the docs that stated this code is like Pascal, what do I need to look up in order to find programming help.
Yes, you are going to miss the nicely overloaded CLoadString class from QALoad. [img]/images/graemlins/frown.gif[/img]
I have a demo version of silk performer installed. It didn't take more than a few minutes to find the answer in the help file, maybe you should explore that... Look for 'conversion' in the index.
example uses the string function to convert number to string
<font class="small">Code:</font><hr /><pre>
yourNumVar : number;
yourStrVar1 : string;
yourStrVar2 : string;
yourNumVar := 1;
yourStrVar1 := "this";
yourStrVar2 := yourStrVar1 + string(yourNumVar);
you can use GetUserId Function, for more information see silk help.Retrieves a unique ID (number) for each current virtual user in a load-test. The ID is 1 for the first virtual user, 2 for the second and n for the nth virtual user.
TGetUserId : 1;
nUserId := GetUserId();
write("user ID = "); write(nUserId); writeln;