Forum Discussion

feroz_k's avatar
feroz_k
Occasional Contributor
8 years ago

Nesting a multirecord datasource into a XML Hierarchy

Thanks to the amazing community. I hope to learn something new hear, and my posts might be very basic.  This is Data driven test case:

<Header>

      <Record1>value1</Record1>

</Header>

<Detail>

      <Rec>value1</Rec>

      <Rec>value2</Rec>

       <Rec>value3</Rec>

</Detail>

 

I am trying to create the above soaprequest using 2 datasources that read form excel. I want to get Record1 from one sheet (a single record), and from another sheet, multiple records of Rec. I am wondering if Index is allowed in the GetValue function. I tried index, but don't seem to get anything. If Index is allowed, what might be a way to read multiple records from an Excelsheet and add data. (I don't want a SOAP request per record, rather a single SOAPrequest (with 2 or more Rec).

 

Thx

2 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    I am not sure why do you have data spread like that.

    Let the test be simple, so the data. Can't the data be put into single data source?
  • feroz_k's avatar
    feroz_k
    Occasional Contributor
    Hi: I was trying to simulate a simple scenario where the total count of Rec is variable can be changed and still produce xml with 5 or 20 or 30 Rec. for example if a class list can have any number of students, but want to make sure the class size is variable. Even if fixed, how can I get multiple records? I tried the index[i] as an option, but that did not work.