Service Virtualization

Expand all | Collapse all

Handle multiple records at web service execution step

  • 1.  Handle multiple records at web service execution step

    Posted 01-25-2019 12:53 PM

    My requirement for a performance testing is to send multiple request from a database table and send to webservice URL via  web service execution xml step to at once is there a way to achieve this ? As in current scenario i am only able to pull one record from the database table and send at one time 



  • 2.  Re: Handle multiple records at web service execution step

    Posted 01-25-2019 01:43 PM

    Is it possible to attach the testcase   or screen shot  that shows the flow of your testcase ?  

     

    If not,  open a ticket with Support , we can go over this in a webex. 

     

    Thanks

     

    Shiney. 



  • 3.  Re: Handle multiple records at web service execution step

    Posted 01-25-2019 01:58 PM



  • 4.  Re: Handle multiple records at web service execution step

    Posted 01-26-2019 01:59 AM

    DevTest offers following features to support performance/load testing:

    • Define a database query within a "Read rows from a JDBC table" dataset
    • Mark the dataset as global
    • At deployment use a staging document, set the number of required "instances", i.e. how many concurrent request you want to send to your SUT. The number of instance results into required number of vUsers within the Simulator at runtime.

     

    Cheers,

    Danny



  • 5.  Re: Handle multiple records at web service execution step

    Posted 01-28-2019 08:31 AM

    Hi Danny 

     

    Thanku for your quick response i tried staging the test with 5 as the instance but it is pulling 1 row/ data from database table and is send the same request 5 times instead of pulling 5 different records from the database, Can you please with me with this 

     

    Thanks and Regadrs

    Akanksha Gupta 



  • 6.  Re: Handle multiple records at web service execution step

    Posted 01-28-2019 08:57 AM

    This would be the behaviour of a local data set. So, 2 questions:

    • "pulling 1 row/ data from database table ", this is done in a "Data Set"? (The feature is not available for JDBC steps, etc...)
    • In the Data Set configuration make sure the "local" checkbox is NOT checked

     

    Cheers,

    Danny



  • 7.  Re: Handle multiple records at web service execution step

    Posted 01-28-2019 09:31 AM

    Hi Danny 

     

    Yes i have created a Dataset and the local box is not checked but still its selecting oy one record from the database table 

     

    Thanks and Regards

    Akanksha Gupta



  • 8.  Re: Handle multiple records at web service execution step

    Posted 01-29-2019 02:26 AM

    Hi Akanksha,

     

    I wanted to point you to the documentation where it is all explained but realized that this feature is not adequately documented (or not at all). So, there's some work for the product team there.

     

    Here's how I understand that you get this to work:

    • Remove the loop in the testcase, the last step should go to "End"
    • Also, the "At end of data" should not loop onto itself, I think that should never be needed. Theoretically that creates an endless loop because when you are at the end of your result set you loop back to the same step but the data set is not marked as "Start over" so it stays at End and will loop back again, etc, etc...
    • You need to decide if you want your load test to run a fixed number of times (until the end of your dataset) or a fixed amount of time.
      • For a fixed number of times set the "At end of data" to "End". Set the staging document's Max Run Time to "No Max (Test case decides)"
      • For a fixed amount of time set the "At end of data" to "Start over". Set the staging document's Max Run Time to some time limit

     

    Let us know if this works as required.

     

    Cheers,

    Danny 



  • 9.  Re: Handle multiple records at web service execution step

    Posted 01-29-2019 02:29 AM

    What I wanted to add as explanation of why this works without a loop in the testcase is the fact that for a global dataset the Coordinator executes the query and manages the result set. So the coordinator hands out the testcase and the next row of data to the next vUser (see number of instances) that comes available. The testcase itself does not have to loop to get the next row of data.

     

    Cheers,

    Danny