Current Articles | Categories | Search | Syndication

Comments
by David on Tuesday, September 19, 2006
Here is the JScript version of this script:

function GetRandomString(len)
{
var index, str, startChr;
var range = 26;

str = "";
for (i = 0; i < len; i++) {
startChr = (Math.random() < 0.5 ? "a" : "A");
str += String.fromCharCode(startChr.charCodeAt(0) + Math.random() * range);
}
return str;
}
by Robert Leahey on Wednesday, September 20, 2006
Hi there, Tips.
On a related note, there's a routine for creating a Counter String (a self-documenting string of a specified length) in my String Utilities Plug-in (http://www.automatedqa.com/community/Home/Articles/tabid/38/articleType/ArticleView/articleId/272/Realworld-TestComplete-Plugins-Part-I.aspx). However the counter string is more applicable to length, where as yours is good for primarily alpha characters. Good stuff. I should add it to the next version of the string utils plug-in.
by Tips on Friday, September 22, 2006
*David - nice elegant variation to use upper/lower case with a small change. I don't thing vbscript has an equivalent.

*Robert - very cool. I'd love to read some short tips on that plug-in. These tips aren't really meant to break new ground, you've probably done all this many times before. I just want to create some nice short examples to help people get started or find a quick answer.
by Edmond on Wednesday, March 19, 2008
any chance i can get this in Delphi.

Cheers
Click here to post a comment

AQA Products

TestComplete Strengthen your software with automated testing. Free trial. AQtime Everything you need to make your application fast and lean. Free trial. AQdevTeam Help your team work smarter with a complete project view and graphical workflow. Free trial. Automated Build Studio Transform error prone, complicated build and release tedium into a simple, clean automated process. Free trial.
AutomatedQA Home

Events

TestComplete Training Summit - July '08
We are happy to announce that you may now purchase seats for the next AutomatedQA Training Summit. The event will be held at the Hard Rock Hotel in fabulous Las Vegas July 14th to the 17th. We hope to see you there!

To signup or for more information please head to the Training Summit Info page.
TestComplete Training Summit - May '08

AutomatedQA is happy to announce our next training summit! The next summit will be held May 12-15, 2008 at the Hard Rock Hotel and Casino in Fabulous Las Vegas!

Reserve your seat now as they do fill up quick! If you would like to read more about the summit you can do so here.

If you already know this is the event you have been waiting for you can head directly to the order page using this link. If you have any questions please send an email to training@automatedqa.com. Thank you and we look forward to seeing you there!