Parse partial data for check list

Parse partial data for check list

Home Forums Ask Expert Parse partial data for check list

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #32279
    Alan Carr
    Participant

      Hi

      I am very new to ZAP test, I’m carrying out some API testing, My server response has two parameters which I can quite happily add to my check list, however is it possible to check a subset of the returned parameters

      eg Returned Message
      standard”:”AAAA BBBB CCCCC”,” status”:200}

      Where I should like to only test a portion of the returned message AAAA or BBBB etc

      Secondly when things get a little more complicated how do I check when multiple items are returned and check against them, I guess I need to amend my path ?

      #32283
      Valentin ZAP
      Keymaster

        Hello Alan!

        1. If you would like to check the only portion of your returned data, you could use a regular expression there, but to enable them you should update object properly value: “Use RExpseg” -> True. Then you could set checklist value as “AAA”, “BBB” or use any other valid regular expression.

        2. Yes, you should use multiple items in your checklist. We could access any member of the complex object by path, where for arrays we should use the brackets “[0]”, example: “Data[0].Name”

        PS. Also, you could use helper object methods to get all or part data and do all check in the script (for advanced case): see .GetMemberResponse method
        PPS. If you get any troubles with paths, please let us know.

        Let us know if you still have any questions.

        Thank you,
        ZAPTEST Team

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.

      Virtual Expert

      ZAPTEST

      ZAPTEST Logo