Forum Discussion

Priya_Ranjan_Si's avatar
Priya_Ranjan_Si
New Contributor
16 years ago

Validation of the responses using assertion

Is it possible to have validate multiple responses from the XML output,  simultaneously using a single assertion.

I was using Xpath match assertion , it actually checks the entire output in one shot , but it shows errors only on the very first unexpected response, and skips the rest. Is there is any way to loop assertions or to have a single assertion telling all the unexpected responses in the output.

Currently in my xml output, I have got around 200 responses to validate,
Is there any way I can validate all with one assertion or need to execute 200 assertions for testing one xml output.

3 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    I'm not really sure what you mean by "xml output" and "200 responses".. is it that you want to validate 200 blocks of xml in your response message?

    (sorry for not getting it..)

    regards!

    /Ole
    eviware.com
  • Hi Ole,

    Yeah, you are right, It is 200 blocks of XML in the response message like this below,


        6002
        futurasync
     



     
          1000
          1010
          600
          100
         
          4
       

       

       
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    if you want to assert all blocks individually you will have to create one assertion for each block, otherwise you can create just one assertion with the entire xml containing all 200 blocks!?

    regards,

    /Ole
    eviware.com