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

Lost Password?


Testing Tools >> OpenSTA

Pages: 1

Reged: 07/12/12
Posts: 5
Getting Conflicting or Duplicate Option
      #712293 - 07/17/12 01:12 AM

I have two Queries

(a)For passing multiple variables in excel file i have followed below steps

Step 1: Select "Variable...Create" from the top menu of the Script Modeler. Enter the variable name, scope, type and order. Set the Value Source to "Database". Select Next.

Step 2: Change the Data Source value to "Excel Files" and select Next. Select your Excel file using the dialog box that now appears.

Step 3: Select the radio button for "Query" and enter a query in the window that will select the correct column from your Excel workbook.
For example "select EMAIL from [sheet1$] "

After that when i compile the Script i am getting below Error

Compiling... TST7.HTP

, "", "", "", "" ), GLOBAL
TST7.HTP(27) : error (cnfdupopt), Conflicting or Duplicate Option
scl: info (endnoobj), TST7.HTP Completed with 1 Diagnostic - Object Deleted

(b) Can you plz let me know if i have a excel file with the name Data.xls which consists columns like Category,Email,ID,Price by using this i need to pass 3 rows (Example: For Email,, Is there way that we can directly add the Data.xls so tht the tool take variables from Excel sheet.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Bernie VelivisModerator

Reged: 06/02/03
Posts: 1604
Loc: Hollis, NH, USA
Re: Getting Conflicting or Duplicate Option [Re: Saritha77]
      #712467 - 07/18/12 12:36 PM

I am not sure why you are getting the syntax error. Also, there is no direct way to have opensta use the excel file at run time. Here is what I do. For a spreadsheet having N columns, I put each column in a seperate file having names that are meaningful (like catagory, email, ID, price). Each file has the same number of records (rows) but no header.. just values. Name the files with extention .fvr and put then i the data sub directory of the opensta repository (by default this is /opensta/data).

Now assuming you want each user to get a unique "row" from these files (which are now colums of data )do something like this;

CHARACTER*512 category, FILE ="category", GLOBAL
CHARACTER*512 email, FILE ="email", GLOBAL
CHARACTER*512 price, FILE ="price", GLOBAL

CHARACTER*512 category_l , local
CHARACTER*512 email_l, local
CHARACTER*512 id_l, local
CHARACTER*512 price_l, local

!Next you want to synchronize access as the script runs to be sure each iteration for each user gets a unique set of values.

Acquire test-wide mutex "getdata"
!read in the next data value in each of the files
next category
next email
next id
next price
!since these are global variables, there is only ONE copy in memory.. so we better save a copy in our local address space so the next script that executes this code doesn't change the value we are working with
! Lets make a local copy

set category_l = category
set email_l = email
set id_l = id
set price_l = price

!all done makign local copies, only reference the variables that end with "_l" from here untill the end of the script. Forget about the global variables.. you cant know what they hold as other scripts may have changed their value.

release the mutex so other scripts can run this protected code

release test-wide mutex "getdata"

Bernie Velivis, Performax Inc
Bernie's blog

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

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

Moderator:  SteveKay, AJ, dansut, Bernie Velivis 

Print Topic

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

Topic views: 1431

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5