Forum Discussion

ssingh1's avatar
ssingh1
New Contributor
11 years ago

How can I automate where a element can occur multiple times

Hi , 

 

I am automating the web services project in SOAP UI where an element can occur multiple times . Because of the fact that my automated test cases are not dynamic , I am getting hard time automating elements which are optional or have multiple occurances.

 

for example , lets assume I have a addEmpAddress() and this is how I automate this operation : -

 

 

addEmpAddress

         EmployeeId (1..1)

         Address (1..N)

               Street Address (1..1)

               City (1..1) 

               Country (1..1)

 

1. Get all the input fields to the operation from excel sheet

2., I insert all the address fields in my operation and execute the operation

3.Loop to first step to grab second excel row.

 

The above approach works perfectly but I can not find a solution on how can I test multiple occurances of address field. What I mean is , I want to test a scenario where one employeeId can have more than 1 address.

 

Please suggest me which approach you will take .

 

Thanks

 

1 Reply

  • nmrao's avatar
    nmrao
    Community Hero
    As you know excel is flat and hierarchial, you want to consider using xml data shource instead of excel? It allows you have any number of address elements under an employee?