<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Unique Usernames in LoadRunner</title>
	<atom:link href="http://www.myloadtest.com/unique-usernames-in-loadrunner/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.myloadtest.com/unique-usernames-in-loadrunner/</link>
	<description>Performance Testing with a LoadRunner focus</description>
	<lastBuildDate>Wed, 25 Jan 2012 17:37:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Aju Sreekumar</title>
		<link>http://www.myloadtest.com/unique-usernames-in-loadrunner/#comment-13690</link>
		<dc:creator>Aju Sreekumar</dc:creator>
		<pubDate>Fri, 14 Dec 2007 05:57:34 +0000</pubDate>
		<guid isPermaLink="false">/?p=20#comment-13690</guid>
		<description>I have recently started working on Loadrunner leaving back my short stay in the Java/J2EE arena. As I do not have a profile in the mercury support site yet, I have not seen the original article by John, which is the center point to this discussion. Right now I use this approach to generate unique UserIds. Here is the code snippet.

// modify the uniqueId for each test run
char *uniqueId = &quot;XXX1&quot;;
char memberId[20];

//Generate Unique MemberIds
sprintf(memberId, 
  &quot;%s%s%s&quot;, 
  uniqueId, 
  lr_eval_string(&quot;{VUserID}&quot;), 
  lr_eval_string(&quot;{IterationNumber}&quot;));

For each test run, I increment/modify the uniqueId and keep track of the changes in my workbook, there by I can refer back and find out at a later stage when was the memberId created. This approach works fine for us and removes any ambiguity that may arise with srand or millisecond approach.

The down side that I can foresee with the approach as suggested by the author is that there is a small percentage of chance for the userIds/usernames to be repeated when running multiple tests. Please share your thoughts on this.

Regards,
AJ</description>
		<content:encoded><![CDATA[<p>I have recently started working on Loadrunner leaving back my short stay in the Java/J2EE arena. As I do not have a profile in the mercury support site yet, I have not seen the original article by John, which is the center point to this discussion. Right now I use this approach to generate unique UserIds. Here is the code snippet.</p>
<p>// modify the uniqueId for each test run<br />
char *uniqueId = &#8220;XXX1&#8243;;<br />
char memberId[20];</p>
<p>//Generate Unique MemberIds<br />
sprintf(memberId,<br />
  &#8220;%s%s%s&#8221;,<br />
  uniqueId,<br />
  lr_eval_string(&#8220;{VUserID}&#8221;),<br />
  lr_eval_string(&#8220;{IterationNumber}&#8221;));</p>
<p>For each test run, I increment/modify the uniqueId and keep track of the changes in my workbook, there by I can refer back and find out at a later stage when was the memberId created. This approach works fine for us and removes any ambiguity that may arise with srand or millisecond approach.</p>
<p>The down side that I can foresee with the approach as suggested by the author is that there is a small percentage of chance for the userIds/usernames to be repeated when running multiple tests. Please share your thoughts on this.</p>
<p>Regards,<br />
AJ</p>
]]></content:encoded>
	</item>
</channel>
</rss>

