cancel
Showing results for 
Search instead for 
Did you mean: 

Rest API: validate dinamic attibute name

SOLVED
Highlighted
Contributor

Rest API: validate dinamic attibute name

Hi guys,

I'm approacing to soap ui.

I have call with post my API, I pass in the header a json.

Response is a JSON, and must have or not attribute in the response.

I would like to check assertions, with tose dinamic attributes.

 

in attachment my project.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Rest API: validate dinamic attibute name

8 REPLIES 8
Highlighted
Community Hero

Re: Rest API: validate dinamic attibute name

Are you missing to add something to your question?


Regards,
Rao.
Highlighted
Community Hero

Re: Rest API: validate dinamic attibute name

Hey @msalvador,

Just reiterating what Rao said.
You intend to use soapui...do you mean the open source version or the licensed ReadyAPI! tool?

In regards to your description, you say you have a REST API to test....it uses a POST method and the payload of the request is in .json type and the response has a .json payload too.
You want to assert against the content of the response's payload.

This all sounds typical stuff....does all my above description sound correct?

So what exactly is the question you want answering?

Also, you state you attached a file, but there wasnt any attachment in your post...?? Did i misunderstand?

Cheers,

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
Contributor

Re: Rest API: validate dinamic attibute name

The only "outcome" attribute is required, next update and list attributes are dynamic.

Highlighted
Community Hero

Re: Rest API: validate dinamic attibute name

Please use json path assertion.


Regards,
Rao.
Highlighted
Community Manager

Re: Rest API: validate dinamic attibute name

@msalvador , were you able to try what's suggested? Using the json assertion? Please share.


Sonya Mihaljova
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Contributor

Re: Rest API: validate dinamic attibute name

no I wasn'

Highlighted
Community Hero

Re: Rest API: validate dinamic attibute name

Highlighted
Community Manager

Re: Rest API: validate dinamic attibute name

Thanks Rao!

 

@msalvador The documentation Rao provided should help you achieve your goal. Please let us know if you need more help on this!


Sonya Mihaljova
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
The new challenge is here!

Create a script to сhange an XPath Match assertion to a JSONPath Match assertion for the TechCorner tag!


Scripts created in July:
- A script to generate an email when an assertion fails
- A script to change the request body before sending it to the server
Top Kudoed Authors