Forum Discussion

Manoj's avatar
Manoj
Contributor
6 years ago

Create XML test step

Hi ,

 

I have a need to create XML file as value with in a parameter. 

 

Ex- In my request , I have InteropApiData and TemplateData as XML file . Also I need to chagne data in that XML based on previous steps (Here OrderNo, EnterpriseCode ...etc). 

Please guide.

 

Thanks

MJ

 

5 Replies

  • richie's avatar
    richie
    Community Hero
    Hey!

    if im guessing correctly as to what you need there are multiple ways of doing this.

    I need a bit of clarification:

    Its REST not SOAP?
    What method? POST?
    Your payload is an xml container and within one of the tags is another complete xml instance (analagous to SOAP)? Is that correct?
    The xml that is "contained"...is the whole instance where do you get that from?
    The xml that is "contained", how many tags need parameterising?

    The more info we havr the better. Example payloads would be very helpful too!

    Cheers,

    richie
  • nmrao's avatar
    nmrao
    Champion Level 3
    What exactly needs to be modified in the xml?
    • Manoj's avatar
      Manoj
      Contributor

      I want XML as a test step.

       

      As in my SOAP/Rest request I have a Key and Value pair.

      The Value takes a entire XML. Also in the XML is being constructued by taking values from previos SOAP/Rest responses. 

       

      Thanks,

      MK

       

       

      • nmrao's avatar
        nmrao
        Champion Level 3
        You can use test case level custom property and use that for the parameter value as ${#TestCaes#XML}, assuming that XML custom property is defined and xml content is saved as value.
    • Manoj's avatar
      Manoj
      Contributor

      nmrao wrote:
      What exactly needs to be modified in the xml?

       

      I want XML as a test step.

       

      As in my SOAP/Rest request I have a Key and Value pair.

      The Value takes a entire XML. Also in the XML is being constructued by taking values from previos SOAP/Rest responses.