Forum Discussion

LiamTester's avatar
LiamTester
New Member
7 years ago

Alternative to using Excel DataSink with VLOOKUP?

Hi,

 

I currently have the following test case where the aim is to create new records in a database table (Product) that includes a foreign key to another table (ProductType). I currently have the test setup as follows:

 

  1. JDBC DataSource that retrieves the IDs and Descriptions of records in ProductType table
  2. DataSink that saves these IDs and Descriptions to an Excel workbook in sheet 1. In sheet 2 I have a list of Product Names and Product Types that I want to use in a POST. I then use VLOOKUP to populate the ProductTypeId in sheet 2 based on the values in sheet 1
  3. DataSource Loop
  4. Excel DataSource that pulls from sheet 2 of the workbook
  5. POST REST Request that uses the Name and ProductTypeId values from data source
  6. DataSource Loop

 

This works perfectly well for the moment however I have 2 concerns going forward:

  1. The SoapUI project is version controlled using Visual Studio, the Excel workbook should really be checked in along with the project however would mean that I need to check out the Excel workbook every time I wanted to run the DataSink step.
  2. When the project moves to another environment, the server may not have an instance of Excel

 

I would therefore like to keep all data sources contained within SoapUI (e.g. use the Grid type)

 

I have played around with using Grid data sources and using Property Transfer steps but I'm stuck.

 

Unfortunately I don't have any previous experience of writing groovy scripts and only know a little bit about XPath.

 

I am using SoapUI NG Pro 2.0.

 

Any ideas would be greatly appreciated!

1 Reply