AnsweredAssumed Answered

Creation of Dynamic request xml based on Dataset(Read rows from Excel)

Question asked by MohammedShahid on Nov 2, 2015
Latest reply on Feb 27, 2018 by AR00353866

Hi ,

Iam new to LISA Automation tool . Iam using LISA Dev test to test my Restful webservices.

I need to create the  dynamic XML request based on Dataset(Read rows from Excel) and pass that request to Rest Step.

I have 100 rows in my excel . Each row contains test scenario with specific values for each column say  for e.g,

I have request structure like below

<insertRequest xmlns:="http://com.abc.com/ccs/xmlschema">

<AppName></Appname>

<Type></Type>

<FirstName></FirstName>

<LastName></LastName>

<Address>

  <AddressLine1></AddressLine1>

  <AddressLine2></AddressLine2>

</Address>

<Phone>

   <PrimaryPhone></PrimaryPhone>

   <SecondaryPhone></SecondaryPhone>

</Phone>

<Email></Email>

</insertRequest>

 

 

In First row-I have AppName and phone number value alone and the remaining column values are empty. I need to generate xml  request like below.

<insertRequest xmlns:="http://com.abc.com/ccs/xmlschema">

<AppName>Hari</AppName>

<Phone>

<PrimaryPhone>9898998989</PrimaryPhone>

</Phone>

</insertrequest>

and pass that req to REST Step and generate response

If i don't have value for Address element,Email,FirstName, LastName and Type should get removed .In Address Tag(including <Address> </Address> should get removed while reading Dataset). See Above request as we need exactly like same.

Plz suggest .Plz help me with sample piece of code  if  i need to use Java Script step. Initially  we can do the same testing in SOAP UI but now are Automating with CA LISA Dev test .

Attachments

Outcomes