Forum Discussion

vpachpute1's avatar
vpachpute1
Frequent Contributor
8 years ago
Solved

How to run one request for 5 times with different parameterised test data

Hi

I have to run following purchase request for  5 times.

Each time, I have to call different package names which I will keep in custom properties.

e.g. In first run , should call ${#TestSuite#packageName1}

e.g. In second run , should call ${#TestSuite#packageName2}

 

Can you please suggest the solution for same.

 

 

Request:

 

<?xml version="1.0" encoding="UTF-8"?>
<request>
      <purchase>
         <Phone>${#TestSuite#Phone1}</Phone>
         <package>${#TestSuite#packageName1}</package>
        </purchase>
</request>

  • Take a look at the data driven testing capabilities of Ready API, this seems to be the scenario you are after, repeating a set of test step with a list of input data values. A Grid Data Source and Data Source Loop should take care of storing and iterating through your data (Do look at the other data sources available as they may be one to better suit your needs). Just put you SOAP step between these two and reference the data in the source.

     

    This may be simpler than storing you data in a set of test suite properties, and hand crafting a solution.

7 Replies

  • Radford's avatar
    Radford
    Super Contributor

    Take a look at the data driven testing capabilities of Ready API, this seems to be the scenario you are after, repeating a set of test step with a list of input data values. A Grid Data Source and Data Source Loop should take care of storing and iterating through your data (Do look at the other data sources available as they may be one to better suit your needs). Just put you SOAP step between these two and reference the data in the source.

     

    This may be simpler than storing you data in a set of test suite properties, and hand crafting a solution.

  • nmrao's avatar
    nmrao
    Champion Level 3
    Do you have fixed list of valid values for phone and package?
    What is the structure of test case?
    • vpachpute1's avatar
      vpachpute1
      Frequent Contributor

      Hi

       

      1. Phone no will be only one.

      2. Package will change.

       

      In short, I have to purchase multiple (5-6) different packages on same phone numbers.

       

      Purchase Request will be same. But in each run, package should be different.

       

      Regards

      Vishal

      • nmrao's avatar
        nmrao
        Champion Level 3
        Please go thru the question again and reply to the requested info.