UFT-API-Testing using the Validate XMl function

Hello every one,

 

If someone can help me i need several light in usign a the 'Validate XML" function for a test API in UFT.

I'm more familiar with GUI testing and recently I had to focus on the test API so I am little bit new with Service Test.

 

The work flow of my test is quite simple :  

1. using a function of a web service 

2. check the syntaxe of the response with

3. check some data in the response

 

My problem is at the step 2 where Im using the function "Validate XML" with  XSD file to check the syntaxe of the response : whatever the parametization I do a always get a false status but if i see the response by myself I do not see any problems of syntaxe :all tags expected are well present in the reponse.

 

If anyone can help my how to do the well parametization for this function it would be nice.

 

Thanks a lot.

 

 

Tags:

Parents Reply Children
  • Hi,

     

    Can anybody please help me to understand how to validate XML data with in UFT API test?

    I have some XML responses where response body look like this-

     

     

    <Tariff1>

    <Code>Value</Code>

    <Desc>Value</Desc>

    <Tariffelement1>

    <A>Value</A>

    <B>Value</B>

    </Tariffelement1>

    <Tariffelement2>

    <D>Value</D>

    <E>Value</E>

    </Tariffelement2>

    </Tarrif1>

    <Tariff2>

    <Code>Value</Code>

    <Desc>Value</Desc>

    <Tariffelement1>

    <A>Value</A>

    <B>Value</B>

    </Tariffelement1>

    <Tariffelement2>

    <D>Value</D>

    <E>Value</E>

    </Tariffelement2>

    <Tariffelement3>

    <D>Value</D>

    <E>Value</E>

    </Tariffelement3>

    </Tarrif2>

    <Tariff3>

    <Code>Value</Code>

    <Desc>Value</Desc>

    <Tariffelement1>

    <A>Value</A>

    <B>Value</B>

    </Tariffelement1>

    <Tariffelement2>

    <D>Value</D>

    <E>Value</E>

    </Tariffelement2>

    </Tarrif3>

     

    Thanks for the help in advance !!

     

  • The validate XML just checks the given xml against the xsd file provided. 

     

    What do you mean response? Response from where/what?