Forum Discussion

cstott1's avatar
cstott1
Occasional Contributor
9 years ago
Solved

Issues datasource looping for a SQL server JDBC request

Hi,

 

In summary the aim of this part of an end to end test in SOAPUI NG is to run a SQL statement 5 times (and then stop) for the 5 different values in the Datasource and capture the data.

 

I have the below steps setup as part of a test case:

 

1) Datasource - Excel
2) JDBC Request - uses a SQL server driver to run a SQL statement. In the SQL statement the where clause is populated from the Datasource in step 1 (uses a field called Tracking Number)
3) Datasink - is setup to capture a number of datapoints from the SQL JDBC request
4) Datasourceloop - to loop back to the JDBC request again

 

However when I run it ...it loops to run the 5 queries as required then continues to loop around and runs SQL time. In the Datasink the datafield I am using for the where clause is being captured to <trackingnumber>. I have attached some screenshot to illustrate what I mean by this.

 

can anyone help please?

  • nmrao's avatar
    nmrao
    9 years ago
    Otherwise, you can try on a different sample excel data source, and see if the behaviour is reproducible without your project artifacts. That will also help in case if you want to take it to SmartBear support team when the issue is persistently reproducible.

7 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Not sure, really got the problem being faced.

    In the screen shot, it was showing there is no value for TrackingNumber.

    May you want to precise the exact issue?
    • cstott1's avatar
      cstott1
      Occasional Contributor

      Hi Rao, 

       

      That is the issue, I don't understand why it is still running the SQL with no tracking number an additonal number of time. I was only expecting it to loop 5 times and this to be reflected in the DataSink i.e not show the blank tracking numbers just the 5 

       

      (Note that in the Datasource options I have put in a start row of A1 & an end row of A5) 

    • cstott1's avatar
      cstott1
      Occasional Contributor

      I have just tried this by using a grid datasource which i have populated manually and this does not have an issue. The problem appears to be with using excel as a datasource for a JDBC request

    • cstott1's avatar
      cstott1
      Occasional Contributor

      Hi Rao, any ideas why this is an issue for excel but not grid? I really need to be able to use a excel datasource

      • nmrao's avatar
        nmrao
        Champion Level 3
        Can't comment on it. Because, do not know how it is looping thru the source file in your case. May be you can check the condition or the steps you have in the test case.