The online community for software testing & quality assurance professionals
Calendar   Today's Topics

Lost Password?


Testing Tools >> Micro Focus/Borland/Segue SilkPerformer

Pages: 1

Reged: 12/16/11
Posts: 2
Loc: Ontario
Grappling with the scope of FileCSVLoadGlobalFile
      #693788 - 12/16/11 02:19 PM

I am using Silk 2010 and am having some fun grappling with the "global" scope of FileCSVLoadGlobalFile. I have found that multiple VUs actually seem to see the same rows in the file unless I wrap the file access in a mutex. I have this now, and it works well:

transaction TInit

// Load CSV and set the delimiter to ","
hMutex := CreateMutex("SerializeIDList");

FileCSVLoadGlobal(hUIDFile, UIDFilePath, ",");
FileGetRow(hUIDFile, POST_Start_User_Row);


// Advance to the next row of the file and
// get the UID and User Name from the current row
// The application accepts nicknames only up to
// 20 chars. When re read them here, we may truncate to 20.
// The names in the ID-list should be 8+" "+8 at most -- 19
// characters.
WaitForSingleObject(hMutex, INFINITE);
nRow := FileGetNextRow(hUIDFile);
ThisUserID := FileGetCol(hUIDFile, 2, 20);
ThisUserName := FileGetCol(hUIDFile, 3, 20); // may truncate

// restrict to this range
if (nRow >= POST_End_User_Row) then
FileGetRow(hUIDFile, POST_Start_User_Row);


What I want to do is to have different scripts load the same file, but operate over different ranges of lines in the file. Script A will use rows 1001-5000, B 5001-10000, something like that. A and B multiple VUs should run A and B.

So to get this right, I think I need to understand what is the scope that FileCSVLoadGlobal() is global to? Is it the whole controller, regardless of what script? Only global to instances of a given BDH? All instances of the specific file path?

Unlike with the CreateMutex() I don't get to make up my own scope, and the scope rules don't seem to be clearly spelled out.

If anyone can clarify or suggest how to handle this, I would appreciate. Thanks.


Edited by gardner (12/16/11 03:03 PM)

Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1

Extra information
0 registered and 2 anonymous users are browsing this forum.

Moderator:  AJ, jamesso 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Topic views: 1226

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5