Forum Discussion

bklabel1's avatar
bklabel1
Occasional Contributor
4 years ago

Stop Data Source Loop

Sandbox Script

    DataSource

    SendToConductorWB

    DataSource Loop

 

SendToConductorWB passes values from DataSource to SendToConductorWB.

 

I'm learning about getting data from one Excel Work book and sending to another.  No REST involved yet.

 

The loop appears to keep spinning and does not end.  I have about 5 rows of data in the DataSource Excel Sheet.  It does not seem to know when to stop.  I have been pressing the red square to stop it and then I do not see data go to the target Workbook sheet.

 

I'm not sure what I am doing wrong.

 

Thanks,

Kevin

  • bklabel1 : If you have 5 rows in your workbook and you have configured your DataSource in a way to execute for each row. So all the step will get executed for 5 times

  • Hi Kevin,

    SoapUI does show you a preview of the rows in the spreadsheet in the Datasource window.  If you click the green triangle, and nothing shows, then I'm not sure what is amiss.  Have you defined the columns of interest in the Datasource step that you want to use in your tests?

     

    You're right though, you do have to type in the sheet name.

  • Hi,

     

    In the Datasource Step, if you select Excel as the source type, you get three fields below.  These are file name, the sheet to read and the cell in which the test start to read from. 

     

    So, yes, you can see which row the test will start at.

  • bklabel1 : If you have 5 rows in your workbook and you have configured your DataSource in a way to execute for each row. So all the step will get executed for 5 times

    • ChrisAdams's avatar
      ChrisAdams
      Champion Level 3

      Hi,

       

      A couple of points that might help you spot the issue.

       

      Firstly, in the datasource step, you can 'test' the connection to your source and see the rows that the test will process.  I think it's a 'play' green triangle button.  SoapUI will ask how many rows to show, enter 0 (zero) and click OK.  0 shows all rows.  There will be a message at the bottom of the screen along the lines of "12 rows returned in 32 ms.".  I suggest this as your spreadsheet might really contain thousands of empty rows.  I've come unstuck with this type of issue in the past.  If SoapUI does return more rows than there is data, then try deleting the empty rows.

       

      Secondly, what step does your DataSource Loop step 'point' at?  Forgive me if you've checked this bit, but for completeness, I'll carry on.  The DataSource Loop needs to point at a step to loop back to.  Double click the DataSource Loop step and ensure it is pointed at the "SendToConductorWB" step.  Do not point the DataSource Loop step at the datasource step.

       

      • bklabel1's avatar
        bklabel1
        Occasional Contributor

        I have seen the test database connection when working with MS Query in ReadyAPI 3.5.1.  It does not show up when using Excel or I don't know where to look for it.  Also I wish that once I tell it the Excel sheet that it would list the Sheets in the Workbook without having to cut and paste.  It would also be nice if it showed a sample of the spreadsheet so I can tell the row to start on. Maybe it will be in a future version but it would be nice to have. 

         

        It is a great thing that you could tell that I was pointing to the wrong place with the loop.  

         

        I appreciate you complete answers very much.  I am new here and I can use all of the advice that I can get.

         

        Thanks,

         

        Kevin

         

         

    • bklabel1's avatar
      bklabel1
      Occasional Contributor

      Himanshu,

      Yes.  Now that I have it working I see that it does work that way.

      Thanks,

      Kevin