Forum Discussion

rrbs's avatar
rrbs
Occasional Contributor
7 years ago

[solved] check response attrtibutes

Hi,

can i check "REST" API response attributes for specific values.

The attributes should be tested on 2-3 matches.

Can you help me?

I hope it is understandable. My English is not very good.

 

Best regards   rrbs

  • mgroen2's avatar
    mgroen2
    Super Contributor

    Hi yes you can, you can use Assertions on the responses for that

    • rrbs's avatar
      rrbs
      Occasional Contributor

      ah, ok.

      I have the following response:

      {"LinkType": [
            {
            "Pointed": 0,
            "TypeID": 1,
            "Source": "Ticket",
            "Target": "Ticket",
            "TargetName": "Normal",
            "SourceName": "Normal",
            "Name": "Normal"
         },
            {
            "TypeID": 2,
            "Source": "Ticket",
            "Pointed": 1,
            "TargetName": "Child",
            "SourceName": "Parent",
            "Name": "ParentChild",
            "Target": "Ticket"
         }
      ]}

      and I would like to check the following attributes:

      "TargetName"eq"Child",
       "SourceName"eq"Parent",
    • Olga_T's avatar
      Olga_T
      SmartBear Alumni (Retired)

      Hi all,

       

      mgroen2Radford, thank you for your replies!

       

      rrbs, is your question answered? If so, could you please mark the reply that answers your question as Solution so that other users could find it easier?

       

      Or, do you have any additional information for us?