Assert on an attribute from compressed XML response

LegacyForumLegacyForum Posts: 1,669 ✭✭
edited December 2016 in SOAtest
Hello,
My service is a SOAP Service which takes REST request in attachment and returns REST response in attachment. The returned response is a CompressedXML. Now, I wanted to use assertors to assert on attributes returned in that response. How do I configure that? The assertors (String compare, Value, occurance) doesn't recognize compressed xml and do not show me the attributes. I tried using Method assertor which takes 'CompressedXML' as input and in method but I still can't extract any attributes from response.

For my other tests, I am decoding this XML using 'Method' tool and extracting values for verifications / calculations but I am unable to use assertions to verify attributes.

Is it possible to assert a value in compressed XML using SOAtest? Can I get suggestions on how do I do that?

Thanks,
Ash
Tagged:

Comments

  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    Good afternoon Ash,

    From what I understand, you are trying to run XML Assertions on a Compressed XML attachment. I am also under the impression that you have a package that allows you to decompress the XML into its literal form.

    Given these two points (which is what I believe to be true in your case), can you not create a setup like the following:

    Client -> Attachment Handler -> Method Tool -> XML Assertor

    Where the Attachment Handler extracts the attachment, the Method Tool decompresses the XML, and the XML Assertor running your assertions on the expanded XML.

    As I do not have any further information regarding your specific test setup, nor do I have a copy of your .tst, I can only offer general ideas. Hopefully, they have been helpful, but please feel free to contact [email protected] if you need further assistance or need to send a copy of your .tst.

    Regards,
    Joseph
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    Thanks Joseph for your quick response.
    Yeah, I can use this setup but the only problem doing this is, a possible bug in SOAtest. The problem is: If I add an assertion as an output of a method and that assertion fails, that failure is not reported as a test failure and the test is considered as 'passed'. However, an error is reported in 'Test Results' tab but that doesn't help identify that it is an actual test failure.

    And that is why I wanted to use assertor outside method tool (i.e. as an output of attachment handler itself)

    I guess, we have already reported to Parasoft via our organization mail support a while back but haven't heard anything yet.

    Ash
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    Good evening Ash,

    As for the 'bug', did you make sure to select the option in the Method Tool that "Return value indicates success"? If this option is not selected, then any failing tests chained to the Method tool will not report its success/failure to the actual test.

    If the problem persists, please send a copy of your .tst file to [email protected] attn Joseph Y, and I will try to assist you from there.

    Regards,
    Joseph
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    Ahhh! that's the piece I was missing . I selected that option in Method Tool and worked fine.


    Thanks a lot for your help!!
    Ash
Sign In or Register to comment.